from django.conf.urls import url from django.conf.urls.static import static from .views import render_page from django.conf import settings import os # Adding templates directory to server the docs web page urlpatterns = [] if settings.DEBUG: urlpatterns = static(r'_static/', document_root='docs/templates/_static/') urlpatterns += [url(r'(.*)', render_page)]