From: Emilie Date: Thu, 3 Nov 2016 17:20:24 +0000 (+0100) Subject: Task #356: confirmation cart page X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=863279713e8b189ea1a8d3536515d50a79b8db16;p=mezzo.git Task #356: confirmation cart page --- diff --git a/app/local_settings.py b/app/local_settings.py index 8391d50a..d5e0aa1f 100644 --- a/app/local_settings.py +++ b/app/local_settings.py @@ -170,10 +170,10 @@ EVENT_SLUG = 'agenda' EVENT_GOOGLE_MAPS_DOMAIN = 'maps.google.fr' EVENT_PER_PAGE = 50 EVENT_USE_FEATURED_IMAGE = True -# EVENT_SHOP_URL = 'http://eve-dev2.ircam.fr/pub.php/manifestation/' -EVENT_SHOP_URL = "http://eve-dev2.ircam.fr/pub.php/event/%d/edit" - -EVENT_PASS_URL = 'http://eve-dev2.ircam.fr/pub.php/pass/' +EVENT_DOMAIN = "http://eve-dev2.ircam.fr" +EVENT_SHOP_URL = EVENT_DOMAIN+"/pub.php/event/%d/edit" +EVENT_PASS_URL = EVENT_DOMAIN+"/pub.php/pass/" +EVENT_CONFIRMATION_URL = EVENT_DOMAIN+"/pub.php/cart/done?transaction_id=%s" EVENT_EXCLUDE_TAG_LIST = ['tournees', ] if DEBUG: diff --git a/app/organization/agenda/urls.py b/app/organization/agenda/urls.py index 1caa1283..0ba3f170 100644 --- a/app/organization/agenda/urls.py +++ b/app/organization/agenda/urls.py @@ -8,8 +8,11 @@ from mezzanine.core.views import direct_to_template from mezzanine.conf import settings from organization.core.views import * +from organization.agenda.views import * urlpatterns = [ url("^%s/" % settings.EVENT_SLUG, include("mezzanine_agenda.urls")), + url("^%s/confirmation/(?P[0-9]*)$" % settings.EVENT_SLUG, ConfirmationView.as_view(), name="organization-agenda-confirmation"), ] +# diff --git a/app/organization/agenda/views.py b/app/organization/agenda/views.py index e69de29b..aa4341cc 100644 --- a/app/organization/agenda/views.py +++ b/app/organization/agenda/views.py @@ -0,0 +1,11 @@ +from django.views.generic.base import TemplateView +from mezzanine.conf import settings + +class ConfirmationView(TemplateView): + + template_name = "agenda/confirmation.html" + + def get_context_data(self, **kwargs): + context = super(ConfirmationView, self).get_context_data(**kwargs) + context['confirmation_url'] = settings.EVENT_CONFIRMATION_URL % kwargs['transaction_id'] + return context diff --git a/app/templates/agenda/confirmation.html b/app/templates/agenda/confirmation.html new file mode 100644 index 00000000..2fbf94b6 --- /dev/null +++ b/app/templates/agenda/confirmation.html @@ -0,0 +1,18 @@ + +{% extends "pages/page.html" %} +{% load i18n mezzanine_tags keyword_tags pages_tags organization_tags %} + +{% block meta_title %}{% trans "Confirmation" %}{% endblock %} + + +{% block page_class %} + Confirmation +{% endblock %} + +{% block page_title %} +

{% trans "Confirmation" %}

+{% endblock %} + +{% block page_content %} + +{% endblock %} diff --git a/app/templates/agenda/event_booking.html b/app/templates/agenda/event_booking.html index 432cd2f6..cfd4073f 100644 --- a/app/templates/agenda/event_booking.html +++ b/app/templates/agenda/event_booking.html @@ -2,5 +2,5 @@ {% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags organization_tags %} {% block event_detail_content %} - + {% endblock %}