From e32fba3f8eecfc291201b21776b9f130e152c1c3 Mon Sep 17 00:00:00 2001 From: David Krauth Date: Thu, 23 Dec 2021 11:36:02 -0500 Subject: [PATCH] server docs in docker container --- .dockerignore | 6 +++--- demo/urls.py | 17 +++++++++-------- swingtime/__init__.py | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.dockerignore b/.dockerignore index cb69857..823eeb1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,11 +1,11 @@ .DS_Store .git +.github +.tox +.pytest_cache .coverage .dockerignore .gitignore dist build -docs venv -.tox -.pytest_cache diff --git a/demo/urls.py b/demo/urls.py index eda76e4..cf86b74 100644 --- a/demo/urls.py +++ b/demo/urls.py @@ -1,25 +1,26 @@ import os from django.contrib import admin from django.views.static import serve -from django.conf.urls import include, url +from django.urls import include, re_path from django.views.generic import TemplateView, RedirectView doc_root = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'docs/') + def docs(request): from django import http return http.HttpResponsePermanentRedirect(os.path.join(request.path, 'index.html')) swingtime_patterns = [ - url(r'^$', TemplateView.as_view(template_name='intro.html'), name='demo-home'), - url(r'^karate/', include('karate.urls')), - url(r'^admin/', admin.site.urls), - url(r'^docs/$', docs, name='swingtime-docs'), - url(r'^docs/(?P.*)$', serve, dict(document_root=doc_root, show_indexes=False)) + re_path(r'^$', TemplateView.as_view(template_name='intro.html'), name='demo-home'), + re_path(r'^karate/', include('karate.urls')), + re_path(r'^admin/', admin.site.urls), + re_path(r'^docs/$', docs, name='swingtime-docs'), + re_path(r'^docs/(?P.*)$', serve, dict(document_root=doc_root, show_indexes=False)) ] urlpatterns = [ - url(r'^$', RedirectView.as_view(url='/swingtime/')), - url(r'^swingtime/', include(swingtime_patterns)), + re_path(r'^$', RedirectView.as_view(url='/swingtime/')), + re_path(r'^swingtime/', include(swingtime_patterns)), ] diff --git a/swingtime/__init__.py b/swingtime/__init__.py index 7df6ba0..3145147 100644 --- a/swingtime/__init__.py +++ b/swingtime/__init__.py @@ -1,4 +1,4 @@ -VERSION = (1, 3, 0) +VERSION = (1, 3, 1) def get_version():