diff --git a/main/models.py b/main/models.py index 71a8362..09a6d4c 100644 --- a/main/models.py +++ b/main/models.py @@ -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 \ No newline at end of file diff --git a/main/urls.py b/main/urls.py index 3cce0e9..a54a65c 100644 --- a/main/urls.py +++ b/main/urls.py @@ -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'), ] \ No newline at end of file diff --git a/main/views.py b/main/views.py index 7d5adb4..69796ed 100644 --- a/main/views.py +++ b/main/views.py @@ -164,4 +164,8 @@ def md(req): @rerender def todo(): - return {'title':'Site TODOs','content':"Things to be done on the site:
",'date':'2021/09/21'} \ No newline at end of file + 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 diff --git a/rakka/settings.py b/rakka/settings.py index cab9103..e3e4d6a 100644 --- a/rakka/settings.py +++ b/rakka/settings.py @@ -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'], } } diff --git a/rakka/urls.py b/rakka/urls.py index 17712fe..7989211 100644 --- a/rakka/urls.py +++ b/rakka/urls.py @@ -19,6 +19,5 @@ from . import views urlpatterns = [ path('', include('main.urls')), - #path('', views.index,name='idex'), path('admin/', admin.site.urls), ]