Commits

Luke Plant committed 7d4c40d

Paypal settings tweaks

Comments (0)

Files changed (3)

cciw/cciwmain/common.py

 
     context['menulinks'] = links
     context['GOOGLE_ANALYTICS_ACCOUNT'] = getattr(settings, 'GOOGLE_ANALYTICS_ACCOUNT', '')
+    context['PRODUCTION'] = (settings.LIVEBOX and settings.PRODUCTION)
 
     return context
 
 if LIVEBOX:
     from cciw.settings_priv import PRODUCTION, STAGING, GOOGLE_ANALYTICS_ACCOUNT
 
+from cciw.settings_priv import PAYPAL_TEST, PAYPAL_RECEIVER_EMAIL
+
 WEBSERVER_RUNNING = 'mod_wsgi' in sys.argv
 
 ### MISC ###
 
 DEFAULT_CONTENT_TYPE = "text/html"
 
-
-## PayPal ##
-
-PAYPAL_RECEIVER_EMAIL = "paypal@cciw.co.uk"

templates/cciw/bookings/pay.html

 
 {% if balance > 0 %}
 
-{{ form.render }}
+{% if PRODUCTION %}
+  {{ form.render }}
+{% else %}
+  {{ form.sandbox }}
+{% endif %}
 
 {% endif %}