Merge branch 'chrisjrn/review_page'
This commit is contained in:
commit
ceb967e6c7
2 changed files with 26 additions and 16 deletions
|
@ -4,16 +4,17 @@ from django.conf.urls import include
|
|||
from django.conf.urls import url
|
||||
|
||||
from .views import (
|
||||
product_category,
|
||||
amend_registration,
|
||||
checkout,
|
||||
credit_note,
|
||||
invoice,
|
||||
manual_payment,
|
||||
refund,
|
||||
invoice_access,
|
||||
edit_profile,
|
||||
guided_registration,
|
||||
amend_registration,
|
||||
invoice,
|
||||
invoice_access,
|
||||
manual_payment,
|
||||
product_category,
|
||||
refund,
|
||||
review,
|
||||
)
|
||||
|
||||
|
||||
|
@ -33,6 +34,7 @@ public = [
|
|||
name="invoice_access"),
|
||||
url(r"^profile$", edit_profile, name="attendee_edit"),
|
||||
url(r"^register$", guided_registration, name="guided_registration"),
|
||||
url(r"^review$", review, name="review"),
|
||||
url(r"^register/([0-9]+)$", guided_registration,
|
||||
name="guided_registration"),
|
||||
]
|
||||
|
|
|
@ -98,11 +98,7 @@ def guided_registration(request):
|
|||
attendee = people.Attendee.get_instance(request.user)
|
||||
|
||||
if attendee.completed_registration:
|
||||
return render(
|
||||
request,
|
||||
"registrasion/guided_registration_complete.html",
|
||||
{},
|
||||
)
|
||||
return redirect(review)
|
||||
|
||||
# Step 1: Fill in a badge and collect a voucher code
|
||||
try:
|
||||
|
@ -234,6 +230,17 @@ def guided_registration(request):
|
|||
return render(request, "registrasion/guided_registration.html", data)
|
||||
|
||||
|
||||
@login_required
|
||||
def review(request):
|
||||
''' View for the review page. '''
|
||||
|
||||
return render(
|
||||
request,
|
||||
"registrasion/guided_registration_complete.html",
|
||||
{},
|
||||
)
|
||||
|
||||
|
||||
@login_required
|
||||
def edit_profile(request):
|
||||
''' View for editing an attendee's profile
|
||||
|
@ -370,11 +377,12 @@ def product_category(request, category_id):
|
|||
if request.POST and not voucher_handled and not products_form.errors:
|
||||
# Only return to the dashboard if we didn't add a voucher code
|
||||
# and if there's no errors in the products form
|
||||
if products_form.has_changed():
|
||||
messages.success(
|
||||
request,
|
||||
"Your reservations have been updated.",
|
||||
)
|
||||
return redirect("dashboard")
|
||||
return redirect(review)
|
||||
|
||||
data = {
|
||||
"category": category,
|
||||
|
|
Loading…
Reference in a new issue