Adding DB

This commit is contained in:
Zergling_man 2021-10-09 20:36:50 +11:00
parent 17c4ef970f
commit 08d1b39b25
5 changed files with 17 additions and 10 deletions

View File

@ -1,3 +1,12 @@
from django.db import models
# Create your models here.
class Page(models.Model)
url=models.CharField(max_length=500)
title=models.CharField(max_length=100)
contents=models.TextField()
last_edited=models.DateField(True)
def __str__(self):
return self.title

View File

@ -3,21 +3,15 @@ from . import views
urlpatterns=[
path('',views.index,name='idex'),
path('me.php',views.me,name='me2'),
path('me',views.me,name='me'),
path('contact.php',views.contact,name='contact2'),
path('contact',views.contact,name='contact'),
path('specs',views.specs,name='specs'),
path('vids.php',views.songs,name='songs2'),
path('songs',views.songs,name='songs'),
path('webhost.php',views.host,name='webhost2'),
path('webhost',views.host,name='webhost'),
path('free',views.free,name='free'),
path('myroids/',views.myroids,name='myroids2'),
path('myroids',views.myroids,name='myroids'),
path('myroids/browser',views.myroidbrowser,name='mybrowse'),
path('nerdshope',views.nerdshope,name='shop'),
path('syntax/',views.syntax,name='syntaxer2'),
path('syntax',views.syntax,name='syntaxer'),
path('teapot',views.teapot,name='teapot'),
path('toask',views.articles,name='articles'),
@ -26,4 +20,5 @@ urlpatterns=[
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'),
]

View File

@ -164,4 +164,8 @@ def md(req):
@rerender
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'}
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':''}

View File

@ -78,8 +78,8 @@ WSGI_APPLICATION = 'rakka.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'ENGINE': 'djongo',
'NAME': conf['DBNAME'],
}
}

View File

@ -19,6 +19,5 @@ from . import views
urlpatterns = [
path('', include('main.urls')),
#path('', views.index,name='idex'),
path('admin/', admin.site.urls),
]