Changeset - 640db7e3dced
[Not reviewed]
0 2 0
Christopher Neugebauer - 8 years ago 2016-09-14 04:59:01
chrisjrn@gmail.com
Replaces the final stage of guided registration with a review page, which shows after adding anything to your cart.

Fixes #87
2 files changed with 25 insertions and 15 deletions:
0 comments (0 inline, 0 general)
registrasion/urls.py
Show inline comments
...
 
@@ -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,
 
    edit_profile,
 
    guided_registration,
 
    invoice,
 
    invoice_access,
 
    manual_payment,
 
    product_category,
 
    refund,
 
    invoice_access,
 
    edit_profile,
 
    guided_registration,
 
    amend_registration,
 
    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"),
 
]
registrasion/views.py
Show inline comments
...
 
@@ -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
 
        messages.success(
 
            request,
 
            "Your reservations have been updated.",
 
        )
 
        return redirect("dashboard")
 
        if products_form.has_changed():
 
            messages.success(
 
                request,
 
                "Your reservations have been updated.",
 
            )
 
        return redirect(review)
 

	
 
    data = {
 
        "category": category,
0 comments (0 inline, 0 general)