From 3a93ab77a9ab9f9add6c8e3f048bc2e905a2f7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Mon, 16 Nov 2015 23:23:24 +0200 Subject: [PATCH] Don't load payment views if USE_PAYMENTS=False --- hc/urls.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hc/urls.py b/hc/urls.py index a890f794..8038c1d9 100644 --- a/hc/urls.py +++ b/hc/urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls import include, url from django.contrib import admin @@ -6,5 +7,8 @@ urlpatterns = [ url(r'^accounts/', include('hc.accounts.urls')), url(r'^', include('hc.api.urls')), url(r'^', include('hc.front.urls')), - url(r'^', include('hc.payments.urls')), + ] + +if settings.USE_PAYMENTS: + urlpatterns.append(url(r'^', include('hc.payments.urls')))