Ah, right, need that. Also apparently that's why I use repath; <str:*> doesn't match slashes.

This commit is contained in:
Zergling_man 2021-10-10 00:38:28 +11:00
parent 7930f95b58
commit 476f1ca013
3 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ urlpatterns=[
path('teapot',views.teapot,name='teapot'),
path('toask',views.articles,name='articles'),
path('todd',views.todd,name='todd'),
path('r/<str:src>',views.redirect,name='redirect'),
re_path('r/(.*)',views.redirect,name='redirect'),
path('bikebunny',views.bikebunny,name='bikebunny'),
path('md.rss',views.md,name='md'),
path('todos',views.todo,name='todo'),
path('<str:page>',views.autopage,name='everything'),
re_path('(.*)',views.autopage,name='everything'),
]

View File

@ -169,5 +169,5 @@ def todo():
@rerender
def autopage(page):
p=Page.objects.get(page)
p=Page.objects.get(url=page)
return {'title':p.title,'content':p.contents,'date':p.last_edited}

View File

@ -25,7 +25,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = conf['SECRET_KEY']
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = bool(conf['DEBUG'])
DEBUG = bool(int(conf['DEBUG']))
ALLOWED_HOSTS = [n.strip() for n in conf['ALLOWED_HOSTS'].split(',')]