It might be working.

This commit is contained in:
Zergling_man 2021-10-10 00:27:52 +11:00
parent 2d61a4a98a
commit 7930f95b58
2 changed files with 6 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'),
re_path('r/(.*)',views.redirect,name='redirect'),
path('r/<str:src>',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('<str:page>',views.autopage,name='everything'),
]

View File

@ -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:<br/><ul><li><strong><a href='/syntax'>Syntax checker</a></strong> - looking up syntax bits in different languages. Low priority.</li><li><strong>Become (opennic) DNS provider</strong> - strengthen Tasmania's infrastructure. Maybe become the authority for rakka.tk. Would be annoying without ip4. Anyway.</li><li><strong>Become arch/artix repository</strong> - Mostly just so I'm not constantly redownloading the same packgaes.</li><li><strong>Add DB</strong> - So that date modified is actually automatic kek</li></ul>",'date':'2021/09/21'}
@rerender
def autopage(pageid):
return {'title':'','content':'','date':''}
def autopage(page):
p=Page.objects.get(page)
return {'title':p.title,'content':p.contents,'date':p.last_edited}