From d77cbd0d8d803184429a69e8d863ac822a5910ea Mon Sep 17 00:00:00 2001 From: Calum Andrew Morrell Date: Wed, 5 Nov 2025 15:58:52 +0000 Subject: [PATCH] created app to manage the homepage and standard templates --- core/__init__.py | 0 core/admin.py | 3 +++ core/apps.py | 6 ++++++ core/migrations/__init__.py | 0 core/models.py | 3 +++ core/templates/base.html | 27 +++++++++++++++++++++++++++ core/templates/core/homepage.html | 5 +++++ core/templates/footer.html | 4 ++++ core/templates/header.html | 4 ++++ core/templates/pagination.html | 15 +++++++++++++++ core/templates/usernav.html | 31 +++++++++++++++++++++++++++++++ core/tests.py | 3 +++ core/urls.py | 9 +++++++++ core/views.py | 5 +++++ 14 files changed, 115 insertions(+) create mode 100644 core/__init__.py create mode 100644 core/admin.py create mode 100644 core/apps.py create mode 100644 core/migrations/__init__.py create mode 100644 core/models.py create mode 100644 core/templates/base.html create mode 100644 core/templates/core/homepage.html create mode 100644 core/templates/footer.html create mode 100644 core/templates/header.html create mode 100644 core/templates/pagination.html create mode 100644 core/templates/usernav.html create mode 100644 core/tests.py create mode 100644 core/urls.py create mode 100644 core/views.py diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/admin.py b/core/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/core/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/core/apps.py b/core/apps.py new file mode 100644 index 0000000..c0ce093 --- /dev/null +++ b/core/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "core" diff --git a/core/migrations/__init__.py b/core/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/models.py b/core/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/core/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/core/templates/base.html b/core/templates/base.html new file mode 100644 index 0000000..1b6383c --- /dev/null +++ b/core/templates/base.html @@ -0,0 +1,27 @@ +{% load static %} + + + + + + {% block title %}The Dazed Gerbil ROCKS{% endblock %} + + {% block styles %}{% endblock %} + + + {% block page %} + {% block usernav %} + {% include 'usernav.html' %} + {% endblock %} + {% block header %} + {% include 'header.html' %} + {% endblock %} + {% block sitenav %}{% endblock %} + {% block content %}{% endblock %} + {% block footer %} + {% include 'footer.html' %} + {% endblock %} + {% endblock %} + + + diff --git a/core/templates/core/homepage.html b/core/templates/core/homepage.html new file mode 100644 index 0000000..69daba7 --- /dev/null +++ b/core/templates/core/homepage.html @@ -0,0 +1,5 @@ +{% extends 'base.html' %} + +{% block content %} + +{% endblock %} diff --git a/core/templates/footer.html b/core/templates/footer.html new file mode 100644 index 0000000..a06b47a --- /dev/null +++ b/core/templates/footer.html @@ -0,0 +1,4 @@ + + diff --git a/core/templates/header.html b/core/templates/header.html new file mode 100644 index 0000000..009e985 --- /dev/null +++ b/core/templates/header.html @@ -0,0 +1,4 @@ +
+

The Dazed Gerbil ROCKS

+
+ diff --git a/core/templates/pagination.html b/core/templates/pagination.html new file mode 100644 index 0000000..5c0ad1a --- /dev/null +++ b/core/templates/pagination.html @@ -0,0 +1,15 @@ + + diff --git a/core/templates/usernav.html b/core/templates/usernav.html new file mode 100644 index 0000000..75c05e9 --- /dev/null +++ b/core/templates/usernav.html @@ -0,0 +1,31 @@ +
+ +
+ diff --git a/core/tests.py b/core/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/core/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/core/urls.py b/core/urls.py new file mode 100644 index 0000000..ad5e593 --- /dev/null +++ b/core/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from .views import Homepage + +app_name = "core" + +urlpatterns = [ + path("", Homepage.as_view(), name="homepage"), +] diff --git a/core/views.py b/core/views.py new file mode 100644 index 0000000..29a9d20 --- /dev/null +++ b/core/views.py @@ -0,0 +1,5 @@ +from django.views.generic import TemplateView + + +class Homepage(TemplateView): + template_name = "core/homepage.html"