From 7930f95b583dc9fcf61537046bfc1b8bcfca39e2 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Sun, 10 Oct 2021 00:27:52 +1100 Subject: [PATCH] It might be working. --- main/urls.py | 4 ++-- main/views.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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:
  • Syntax checker - looking up syntax bits in different languages. Low priority.
  • Become (opennic) DNS provider - strengthen Tasmania's infrastructure. Maybe become the authority for rakka.tk. Would be annoying without ip4. Anyway.
  • Become arch/artix repository - Mostly just so I'm not constantly redownloading the same packgaes.
  • Add DB - So that date modified is actually automatic kek
",'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