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 %}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.