From 030b8ac0b3269256ea6f1317ad00b4f7ae3c9cc8 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 28 Sep 2015 10:29:45 +0200 Subject: [PATCH] fix post paypal routines (mostly urls) --- app/diggersdigest/settings.py | 4 ++-- app/diggersdigest/urls.py | 5 ++--- app/records/models.py | 4 +++- app/templates/shop/product.html | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/diggersdigest/settings.py b/app/diggersdigest/settings.py index e57a911..2223274 100644 --- a/app/diggersdigest/settings.py +++ b/app/diggersdigest/settings.py @@ -119,7 +119,7 @@ SEARCH_MODEL_CHOICES = ('shop.Product',) # If True, the checkout process is split into separate # billing/shipping and payment steps. -SHOP_CHECKOUT_STEPS_SPLIT = False +SHOP_CHECKOUT_STEPS_SPLIT = True # If True, the checkout process has a final confirmation step before # completion. @@ -243,7 +243,7 @@ USE_TZ = True # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = "fr" +LANGUAGE_CODE = "en" # Supported languages LANGUAGES = ( diff --git a/app/diggersdigest/urls.py b/app/diggersdigest/urls.py index 6efe25e..735d83c 100644 --- a/app/diggersdigest/urls.py +++ b/app/diggersdigest/urls.py @@ -27,6 +27,8 @@ if settings.USE_MODELTRANSLATION: urlpatterns += patterns('', + (r'^paypal-ipn-8c5erc9ye49ia51rn655mi4xs8/', include('paypal.standard.ipn.urls')), + # Cartridge URLs. ("^shop/", include("cartridge.shop.urls")), url("^account/orders/$", "cartridge.shop.views.order_history", @@ -100,9 +102,6 @@ urlpatterns += patterns('', # need to use the ``SITE_PREFIX`` setting as well. # ("^%s/" % settings.SITE_PREFIX, include("mezzanine.urls")) - - (r'^paypal-ipn-8c5erc9ye49ia51rn655mi4xs7/', include('paypal.standard.ipn.urls')), - ) # Adds ``STATIC_URL`` to the context of error pages, so that error diff --git a/app/records/models.py b/app/records/models.py index 68b9ab3..7035195 100644 --- a/app/records/models.py +++ b/app/records/models.py @@ -19,6 +19,7 @@ from mezzanine.utils.models import upload_to from cartridge.shop.models import Product, Category, Cart, Order, ProductVariation, DiscountCode from paypal.standard.ipn.signals import payment_was_successful +from paypal.standard.ipn.signals import valid_ipn_received # Auto-generated Django models with manage.py inspectdb on the old database @@ -345,4 +346,5 @@ def payment_complete(sender, **kwargs): except Cart.DoesNotExist: pass -payment_was_successful.connect(payment_complete) +#payment_was_isuccessful.connect(payment_complete) +valid_ipn_received.connect(payment_complete) diff --git a/app/templates/shop/product.html b/app/templates/shop/product.html index 047210a..c53f674 100644 --- a/app/templates/shop/product.html +++ b/app/templates/shop/product.html @@ -148,13 +148,11 @@ $(function () { -{% comment %}
{% editable product.content %} {{ product.content|richtext_filters|safe }} {% endeditable %}
-{% endcomment %} {% if product.available and has_available_variations and product.price %} -- 2.39.5