From 3ccb40055e3b721a70406db87bb5bc1e09e7141d Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 7 Jun 2019 08:53:50 +0100 Subject: [PATCH] Add an index page to make it more obvious it works. People were getting confused by the index page returning a 404, so this commit adds an index page so it returns a 200 and looks like it works. --- etesync_server/settings.py | 4 +++- etesync_server/urls.py | 2 ++ templates/success.html | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 templates/success.html diff --git a/etesync_server/settings.py b/etesync_server/settings.py index 2df2914..cfe339f 100644 --- a/etesync_server/settings.py +++ b/etesync_server/settings.py @@ -91,7 +91,9 @@ ROOT_URLCONF = 'etesync_server.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR, 'templates') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/etesync_server/urls.py b/etesync_server/urls.py index c76d88e..8b8fc53 100644 --- a/etesync_server/urls.py +++ b/etesync_server/urls.py @@ -15,6 +15,7 @@ Including another URLconf """ from django.urls import include, path, re_path from django.contrib import admin +from django.views.generic import TemplateView from rest_framework_nested import routers from rest_framework.authtoken import views as token_views @@ -37,4 +38,5 @@ urlpatterns = [ re_path(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), re_path(r'^api-token-auth/', token_views.obtain_auth_token), path('admin/', admin.site.urls), + path('', TemplateView.as_view(template_name='success.html')), ] diff --git a/templates/success.html b/templates/success.html new file mode 100644 index 0000000..c7cf494 --- /dev/null +++ b/templates/success.html @@ -0,0 +1,12 @@ + + + + It works! + + +

It works!

+

+ Please refer to the README to complete the final steps if you haven't done so already. +

+ +