Ah, right, need that. Also apparently that's why I use repath; <str:*> doesn't match slashes.
This commit is contained in:
parent
7930f95b58
commit
476f1ca013
|
@ -16,9 +16,9 @@ urlpatterns=[
|
||||||
path('teapot',views.teapot,name='teapot'),
|
path('teapot',views.teapot,name='teapot'),
|
||||||
path('toask',views.articles,name='articles'),
|
path('toask',views.articles,name='articles'),
|
||||||
path('todd',views.todd,name='todd'),
|
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('bikebunny',views.bikebunny,name='bikebunny'),
|
||||||
path('md.rss',views.md,name='md'),
|
path('md.rss',views.md,name='md'),
|
||||||
path('todos',views.todo,name='todo'),
|
path('todos',views.todo,name='todo'),
|
||||||
path('<str:page>',views.autopage,name='everything'),
|
re_path('(.*)',views.autopage,name='everything'),
|
||||||
]
|
]
|
|
@ -169,5 +169,5 @@ def todo():
|
||||||
|
|
||||||
@rerender
|
@rerender
|
||||||
def autopage(page):
|
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}
|
return {'title':p.title,'content':p.contents,'date':p.last_edited}
|
|
@ -25,7 +25,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
SECRET_KEY = conf['SECRET_KEY']
|
SECRET_KEY = conf['SECRET_KEY']
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# 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(',')]
|
ALLOWED_HOSTS = [n.strip() for n in conf['ALLOWED_HOSTS'].split(',')]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user