diff options
author | komalsheth286 | 2016-10-05 14:16:42 +0530 |
---|---|---|
committer | komalsheth286 | 2016-10-05 14:16:42 +0530 |
commit | d1312be1555c8cb0d372acd7bac28cb6ad051a3d (patch) | |
tree | dd4faec6ac1105a30b7a2c4c8da61cef50168632 /website/views.py | |
parent | 2f3cb1b10df96b5b62ccc794b1eafcfef48d4b5e (diff) | |
download | SciPy2016-d1312be1555c8cb0d372acd7bac28cb6ad051a3d.tar.gz SciPy2016-d1312be1555c8cb0d372acd7bac28cb6ad051a3d.tar.bz2 SciPy2016-d1312be1555c8cb0d372acd7bac28cb6ad051a3d.zip |
resubmission of proposal is added
Diffstat (limited to 'website/views.py')
-rwxr-xr-x | website/views.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/website/views.py b/website/views.py index b516fad..96fa6bb 100755 --- a/website/views.py +++ b/website/views.py @@ -266,10 +266,14 @@ def edit_proposal(request, proposal_id = None): if user.is_authenticated(): proposal = Proposal.objects.get(id=proposal_id) if proposal.proposal_type == 'ABSTRACT': - form = ProposalForm(request.POST, request.FILES, instance=proposal) + form = ProposalForm( instance=proposal) else: - form = WorkshopForm(request.POST, request.FILES, instance=proposal) + form = WorkshopForm( instance=proposal) if request.method == 'POST': + if proposal.proposal_type == 'ABSTRACT': + form = ProposalForm( request.POST, request.FILES, instance=proposal) + else: + form = WorkshopForm( request.POST, request.FILES, instance=proposal) if form.is_valid(): data = form.save(commit = False) data.user = user @@ -279,7 +283,9 @@ def edit_proposal(request, proposal_id = None): return render(request, 'cfp.html') else: context['user'] = user - return render(request, 'cfp.html', context) + context['form'] = form + context['proposal'] = proposal + return render(request, 'edit-proposal.html', context) context['user'] = user context['form'] = form context['proposal'] = proposal |