From 2ab4cf10b83ac51a4ff9c8f73e3956f733fd9248 2016-06-18 03:00:56 From: Scott Bragg Date: 2016-06-18 03:00:56 Subject: [PATCH] Disables registrasion app for production deployment. (#7) * Disable registraison for production environment Fixes lca2017/symposion#12 --- diff --git a/fixtures/registrasion.json b/fixtures/registrasion.json deleted file mode 100644 index 7f49e541b35e516e36a0a5c5acbf982cdd16a753..0000000000000000000000000000000000000000 --- a/fixtures/registrasion.json +++ /dev/null @@ -1,393 +0,0 @@ -[ -{ - "model": "registrasion.category", - "pk": 1, - "fields": { - "name": "Ticket", - "description": "Admission to the conference", - "limit_per_user": 1, - "required": false, - "order": 1, - "render_type": 1 - } -}, -{ - "model": "registrasion.category", - "pk": 2, - "fields": { - "name": "Dinner Ticket", - "description": "Tickets for the conference dinner", - "limit_per_user": null, - "required": false, - "order": 10, - "render_type": 2 - } -}, -{ - "model": "registrasion.category", - "pk": 3, - "fields": { - "name": "T-shirt", - "description": "The conference t-shirt", - "limit_per_user": null, - "required": false, - "order": 30, - "render_type": 2 - } -}, -{ - "model": "registrasion.category", - "pk": 4, - "fields": { - "name": "Accommodation", - "description": "Accommodation in the student dormitories", - "limit_per_user": null, - "required": false, - "order": 40, - "render_type": 2 - } -}, -{ - "model": "registrasion.category", - "pk": 5, - "fields": { - "name": "Extra accommodation nights", - "description": "Extra nights at the student dorms. You will need to purchase the week block before you can add extra nights", - "limit_per_user": null, - "required": false, - "order": 50, - "render_type": 2 - } -}, -{ - "model": "registrasion.product", - "pk": 1, - "fields": { - "name": "Professional", - "description": "", - "category": 1, - "price": "1000.00", - "limit_per_user": null, - "reservation_duration": "1 00:00:00", - "order": 10 - } -}, -{ - "model": "registrasion.product", - "pk": 2, - "fields": { - "name": "Enthusiast", - "description": "", - "category": 1, - "price": "450.00", - "limit_per_user": null, - "reservation_duration": "1 00:00:00", - "order": 20 - } -}, -{ - "model": "registrasion.product", - "pk": 3, - "fields": { - "name": "Student", - "description": "", - "category": 1, - "price": "160.00", - "limit_per_user": null, - "reservation_duration": "1 00:00:00", - "order": 30 - } -}, -{ - "model": "registrasion.product", - "pk": 4, - "fields": { - "name": "Adult", - "description": "Includes a full meal and drinks", - "category": 2, - "price": "85.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 10 - } -}, -{ - "model": "registrasion.product", - "pk": 5, - "fields": { - "name": "Child", - "description": "Includes a children's meal and soft drinks", - "category": 2, - "price": "40.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 20 - } -}, -{ - "model": "registrasion.product", - "pk": 6, - "fields": { - "name": "Infant", - "description": "A seat for an infant in lap", - "category": 2, - "price": "0.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 30 - } -}, -{ - "model": "registrasion.product", - "pk": 7, - "fields": { - "name": "S", - "description": "", - "category": 3, - "price": "25.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 10 - } -}, -{ - "model": "registrasion.product", - "pk": 8, - "fields": { - "name": "M", - "description": "", - "category": 3, - "price": "25.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 20 - } -}, -{ - "model": "registrasion.product", - "pk": 9, - "fields": { - "name": "L", - "description": "", - "category": 3, - "price": "25.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 30 - } -}, -{ - "model": "registrasion.product", - "pk": 10, - "fields": { - "name": "Sunday 19-Saturday 25", - "description": "6 nights", - "category": 4, - "price": "480.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 1 - } -}, -{ - "model": "registrasion.product", - "pk": 11, - "fields": { - "name": "Friday 17", - "description": "", - "category": 5, - "price": "80.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 10 - } -}, -{ - "model": "registrasion.product", - "pk": 12, - "fields": { - "name": "Saturday 18", - "description": "", - "category": 5, - "price": "80.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 20 - } -}, -{ - "model": "registrasion.product", - "pk": 13, - "fields": { - "name": "Saturday 25", - "description": "", - "category": 5, - "price": "80.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 30 - } -}, -{ - "model": "registrasion.product", - "pk": 14, - "fields": { - "name": "Sunday 26", - "description": "", - "category": 5, - "price": "80.00", - "limit_per_user": null, - "reservation_duration": "01:00:00", - "order": 40 - } -}, -{ - "model": "registrasion.voucher", - "pk": 1, - "fields": { - "recipient": "FooCorp", - "code": "FOOCORP", - "limit": 10 - } -}, -{ - "model": "registrasion.discountbase", - "pk": 1, - "fields": { - "description": "Early bird discount" - } -}, -{ - "model": "registrasion.discountbase", - "pk": 2, - "fields": { - "description": "FooCorp complimentary sponsor ticket" - } -}, -{ - "model": "registrasion.discountbase", - "pk": 3, - "fields": { - "description": "1 Dinner Ticket included with Professional Tickets" - } -}, -{ - "model": "registrasion.discountbase", - "pk": 4, - "fields": { - "description": "1 T-Shirt included with all tickets" - } -}, -{ - "model": "registrasion.discountforproduct", - "pk": 1, - "fields": { - "discount": 1, - "product": 1, - "percentage": null, - "price": "200.00", - "quantity": 1 - } -}, -{ - "model": "registrasion.discountforproduct", - "pk": 2, - "fields": { - "discount": 1, - "product": 2, - "percentage": null, - "price": "100.00", - "quantity": 1 - } -}, -{ - "model": "registrasion.discountforproduct", - "pk": 3, - "fields": { - "discount": 2, - "product": 1, - "percentage": "100.0", - "price": null, - "quantity": 1 - } -}, -{ - "model": "registrasion.discountforcategory", - "pk": 1, - "fields": { - "discount": 3, - "category": 2, - "percentage": "100.0", - "quantity": 1 - } -}, -{ - "model": "registrasion.discountforcategory", - "pk": 2, - "fields": { - "discount": 4, - "category": 3, - "percentage": "100.0", - "quantity": 1 - } -}, -{ - "model": "registrasion.timeorstocklimitdiscount", - "pk": 1, - "fields": { - "start_time": null, - "end_time": null, - "limit": 10 - } -}, -{ - "model": "registrasion.voucherdiscount", - "pk": 2, - "fields": { - "voucher": 1 - } -}, -{ - "model": "registrasion.includedproductdiscount", - "pk": 3, - "fields": { - "enabling_products": [ - 1 - ] - } -}, -{ - "model": "registrasion.includedproductdiscount", - "pk": 4, - "fields": { - "enabling_products": [ - 1, - 2, - 3 - ] - } -}, -{ - "model": "registrasion.flagbase", - "pk": 1, - "fields": { - "description": "Extra accommodation depends on Accommodation", - "condition": 2, - "products": [], - "categories": [ - 5 - ] - } -}, -{ - "model": "registrasion.categoryflag", - "pk": 1, - "fields": { - "enabling_category": 4, - "products": [], - "categories": [ - 5 - ] - } -} -] diff --git a/fixtures/users.json b/fixtures/users.json deleted file mode 100644 index c299a7a247953e2371a4791806e78d6b0fcea9c2..0000000000000000000000000000000000000000 --- a/fixtures/users.json +++ /dev/null @@ -1,20 +0,0 @@ -[ -{ - "pk": 1, - "model": "auth.user", - "fields": { - "date_joined": "2015-10-17T00:14:31.619Z", - "groups": [], - "user_permissions": [], - "username": "pinax", - "last_name": "", - "is_superuser": true, - "is_active": true, - "email": "", - "is_staff": true, - "last_login": null, - "first_name": "", - "password": "pbkdf2_sha256$20000$mL5SrgzL4TSJ$y9rRoK1ZghGD8ywsJK0472Zp7DB+fr7jPZ9+MxPlWr0=" - } -} -] diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 3eaf27fab65850a27d8d8e2ba3a3d1f2fc71d267..34741976857871acffe5c6d085f315334ca9ff80 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -154,15 +154,15 @@ INSTALLED_APPS = [ "symposion.teams", # Registrasion - "registrasion", + #"registrasion", #admin - required by registrasion ?? - "nested_admin", + #"nested_admin", # project "pinaxcon", "pinaxcon.proposals", - "pinaxcon.registrasion", + #"pinaxcon.registrasion", #testing "django_nose", diff --git a/pinaxcon/templates/dashboard.html b/pinaxcon/templates/dashboard.html index 350c9d63ae8f707c846b2a50ce3bcde3f20fcb6f..0229dc83582973ff55ac7d4a648f91b925181621 100644 --- a/pinaxcon/templates/dashboard.html +++ b/pinaxcon/templates/dashboard.html @@ -4,7 +4,7 @@ {% load proposal_tags %} {% load review_tags %} {% load teams_tags %} -{% load registrasion_tags %} +{# {% load registrasion_tags %} #} {% block head_title %}Dashboard{% endblock %} @@ -94,78 +94,7 @@ {% endif %} -
-
-
- {% if not user.attendee.completed_registration %} - - Register for the conference - - {% else %} - - Edit your attendee profile - - - {% items_pending as pending %} - {% if pending %} - - Pay your registration - - {% endif %} - {% endif %} -
-

- - {% trans "Registration" %} -

- -
- -
- {% if not user.attendee.completed_registration %} -

To attend the conference, you must purchase a ticket. Use our registration form to purchase your ticket. - {% else %} -

Your registration

- {% items_pending as pending %} - {% if pending %} -
Items pending payment
- {% include "registrasion/items_list.html" with items=pending %} - {% endif %} - {% items_purchased as purchased %} - {% if purchased %} -
Paid items
- {% include "registrasion/items_list.html" with items=purchased %} - {% endif %} -
Add/Update items
- {% available_categories as categories %} - {% for category in categories %} -
  • {{ category.name }}
  • - {% endfor %} - - - {% invoices as invoices %} - {% if invoices %} -
    Invoices
    -
      - {% for invoice in invoices %} - {% if not invoice.is_void %} -
    • - Invoice {{ invoice.id }} - - ${{ invoice.value }} ({{ invoice.get_status_display }}) -
    • - {% endif %} - {% endfor %} -
    - {% endif %} - - {% available_credit as credit %} - {% if credit %} -

    You have ${{ credit }} leftover from refunded invoices. Contact the conference organisers - to put this toward other purchases, or to refund it.

    - {% endif %} - {% endif %} -
    -
    +{# {% include 'registrasion/dashboard-widget.html' %} #}
    diff --git a/pinaxcon/templates/registrasion/dashboard-widget.html b/pinaxcon/templates/registrasion/dashboard-widget.html new file mode 100644 index 0000000000000000000000000000000000000000..0a11dc6dc5f6472fdc5c05d82b00334bc0d5ab5c --- /dev/null +++ b/pinaxcon/templates/registrasion/dashboard-widget.html @@ -0,0 +1,72 @@ +
    +
    +
    + {% if not user.attendee.completed_registration %} + + Register for the conference + + {% else %} + + Edit your attendee profile + + + {% items_pending as pending %} + {% if pending %} + + Pay your registration + + {% endif %} + {% endif %} +
    +

    + + {% trans "Registration" %} +

    + +
    + +
    + {% if not user.attendee.completed_registration %} +

    To attend the conference, you must purchase a ticket. Use our registration form to purchase your ticket. + {% else %} +

    Your registration

    + {% items_pending as pending %} + {% if pending %} +
    Items pending payment
    + {% include "registrasion/items_list.html" with items=pending %} + {% endif %} + {% items_purchased as purchased %} + {% if purchased %} +
    Paid items
    + {% include "registrasion/items_list.html" with items=purchased %} + {% endif %} +
    Add/Update items
    + {% available_categories as categories %} + {% for category in categories %} +
  • {{ category.name }}
  • + {% endfor %} + + + {% invoices as invoices %} + {% if invoices %} +
    Invoices
    +
      + {% for invoice in invoices %} + {% if not invoice.is_void %} +
    • + Invoice {{ invoice.id }} + - ${{ invoice.value }} ({{ invoice.get_status_display }}) +
    • + {% endif %} + {% endfor %} +
    + {% endif %} + + {% available_credit as credit %} + {% if credit %} +

    You have ${{ credit }} leftover from refunded invoices. Contact the conference organisers + to put this toward other purchases, or to refund it.

    + {% endif %} + {% endif %} +
    +
    diff --git a/pinaxcon/urls.py b/pinaxcon/urls.py index 87de23ea41c4d50d0e2101ad837f6018b2f57681..db51c182bd146a99a440952ff8cb24a468f3f5cf 100644 --- a/pinaxcon/urls.py +++ b/pinaxcon/urls.py @@ -28,11 +28,11 @@ urlpatterns = [ url(r"^", include("pinax.pages.urls")), # Required by registrasion - url(r'^register/', include('registrasion.urls')), - url(r'^nested_admin/', include('nested_admin.urls')), +# url(r'^register/', include('registrasion.urls')), +# url(r'^nested_admin/', include('nested_admin.urls')), # Demo payment gateway and related features - url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")), +# url(r"^register/pinaxcon/", include("pinaxcon.registrasion.urls")), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)