diff --git a/main/urls.py b/main/urls.py index a54a65c..4daba3f 100644 --- a/main/urls.py +++ b/main/urls.py @@ -16,9 +16,9 @@ urlpatterns=[ path('teapot',views.teapot,name='teapot'), path('toask',views.articles,name='articles'), path('todd',views.todd,name='todd'), - re_path('r/(.*)',views.redirect,name='redirect'), + 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'), - re_path('(.*)',views.autopage,name='everything'), + path('',views.autopage,name='everything'), ] \ No newline at end of file diff --git a/main/views.py b/main/views.py index 69796ed..d88178f 100644 --- a/main/views.py +++ b/main/views.py @@ -4,6 +4,7 @@ from django.template import loader import random as ra import asyncio from . import mdl +from .models import Page import functools @@ -167,5 +168,6 @@ def todo(): return {'title':'Site TODOs','content':"Things to be done on the site:
",'date':'2021/09/21'} @rerender -def autopage(pageid): - return {'title':'','content':'','date':''} \ No newline at end of file +def autopage(page): + p=Page.objects.get(page) + return {'title':p.title,'content':p.contents,'date':p.last_edited} \ No newline at end of file