redirect to sponsor edit after submission; allow sponsor details to be filled out before approval
This commit is contained in:
parent
6bb23205de
commit
daff4020ea
1 changed files with 3 additions and 3 deletions
|
@ -14,8 +14,8 @@ def sponsor_apply(request):
|
|||
if request.method == "POST":
|
||||
form = SponsorApplicationForm(request.POST, user=request.user)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return redirect("dashboard")
|
||||
sponsor = form.save()
|
||||
return redirect("sponsor_detail", pk=sponsor.pk)
|
||||
else:
|
||||
form = SponsorApplicationForm(user=request.user)
|
||||
|
||||
|
@ -48,7 +48,7 @@ def sponsor_add(request):
|
|||
def sponsor_detail(request, pk):
|
||||
sponsor = get_object_or_404(Sponsor, pk=pk)
|
||||
|
||||
if not sponsor.active or sponsor.applicant != request.user:
|
||||
if sponsor.applicant != request.user:
|
||||
return redirect("sponsor_list")
|
||||
|
||||
formset_kwargs = {
|
||||
|
|
Loading…
Reference in a new issue