From 73a55b98171d865752fd02680f66d365a128e48a Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 26 Mar 2020 18:32:34 +0200 Subject: [PATCH] Add reset url so it can be used with client test suites. --- etesync_server/urls.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etesync_server/urls.py b/etesync_server/urls.py index 5f3a6d7..6a079de 100644 --- a/etesync_server/urls.py +++ b/etesync_server/urls.py @@ -27,6 +27,7 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ +from django.conf import settings from django.urls import include, path, re_path from django.contrib import admin from django.views.generic import TemplateView @@ -54,3 +55,8 @@ urlpatterns = [ path('admin/', admin.site.urls), path('', TemplateView.as_view(template_name='success.html')), ] + +if settings.DEBUG: + urlpatterns = [ + path('reset/', views.reset, name='reset_debug'), + ] + urlpatterns