Skip to content

Commit

Permalink
server docs in docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrauth committed Dec 23, 2021
1 parent 6cff91c commit e32fba3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.DS_Store
.git
.github
.tox
.pytest_cache
.coverage
.dockerignore
.gitignore
dist
build
docs
venv
.tox
.pytest_cache
17 changes: 9 additions & 8 deletions demo/urls.py
Original file line number Diff line number Diff line change
@@ -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<path>.*)$', 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<path>.*)$', 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)),
]
2 changes: 1 addition & 1 deletion swingtime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (1, 3, 0)
VERSION = (1, 3, 1)


def get_version():
Expand Down

0 comments on commit e32fba3

Please sign in to comment.