Commit 88f54fff by Diana Huang

Put shopping cart views behind flags

parent 77ee243e
from django.conf.urls import patterns, include, url from django.conf.urls import patterns, include, url
from django.conf import settings
urlpatterns = patterns('shoppingcart.views', # nopep8 urlpatterns = patterns('shoppingcart.views', # nopep8
url(r'^$','show_cart'), url(r'^postpay_callback/$', 'postpay_callback'), # Both the ~accept and ~reject callback pages are handled here
url(r'^(?P<course_id>[^/]+/[^/]+/[^/]+)/$','test'),
url(r'^add/course/(?P<course_id>[^/]+/[^/]+/[^/]+)/$','add_course_to_cart'),
url(r'^register_verified_course/course/(?P<course_id>[^/]+/[^/]+/[^/]+)/$', 'register_for_verified_cert'),
url(r'^clear/$','clear_cart'),
url(r'^remove_item/$', 'remove_item'),
url(r'^postpay_callback/$', 'postpay_callback'), #Both the ~accept and ~reject callback pages are handled here
url(r'^receipt/(?P<ordernum>[0-9]*)/$', 'show_receipt'), url(r'^receipt/(?P<ordernum>[0-9]*)/$', 'show_receipt'),
) )
if settings.MITX_FEATURES['ENABLE_SHOPPING_CART']:
urlpatterns += patterns(
'shoppingcart.views',
url(r'^$', 'show_cart'),
url(r'^clear/$', 'clear_cart'),
url(r'^remove_item/$', 'remove_item'),
)
if settings.DEBUG:
urlpatterns += patterns(
'shoppingcart.views',
url(r'^(?P<course_id>[^/]+/[^/]+/[^/]+)/$', 'test'),
url(r'^add/course/(?P<course_id>[^/]+/[^/]+/[^/]+)/$', 'add_course_to_cart'),
url(r'^register_verified_course/course/(?P<course_id>[^/]+/[^/]+/[^/]+)/$',
'register_for_verified_cert'),
)
...@@ -154,6 +154,9 @@ MITX_FEATURES = { ...@@ -154,6 +154,9 @@ MITX_FEATURES = {
# Toggle to enable chat availability (configured on a per-course # Toggle to enable chat availability (configured on a per-course
# basis in Studio) # basis in Studio)
'ENABLE_CHAT': False, 'ENABLE_CHAT': False,
# Toggle the availability of the shopping cart page
'ENABLE_SHOPPING_CART': False
} }
# Used for A/B testing # Used for A/B testing
......
...@@ -30,6 +30,7 @@ MITX_FEATURES['ENABLE_INSTRUCTOR_ANALYTICS'] = True ...@@ -30,6 +30,7 @@ MITX_FEATURES['ENABLE_INSTRUCTOR_ANALYTICS'] = True
MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True MITX_FEATURES['ENABLE_SERVICE_STATUS'] = True
MITX_FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True MITX_FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True
MITX_FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True MITX_FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True
MITX_FEATURES['ENABLE_SHOPPING_CART'] = True
FEEDBACK_SUBMISSION_EMAIL = "dummy@example.com" FEEDBACK_SUBMISSION_EMAIL = "dummy@example.com"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment