diff --git a/config/settings.py b/config/settings.py index 81478af..309be78 100644 --- a/config/settings.py +++ b/config/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path +import os from my_secrets import secrets # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -32,6 +33,8 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'pages', + 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -122,3 +125,4 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, 'static/') diff --git a/config/urls.py b/config/urls.py index d15c2c2..f43975b 100644 --- a/config/urls.py +++ b/config/urls.py @@ -14,8 +14,12 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include + +from django.conf import settings +from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), -] + path('', include('pages.urls')) +] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) diff --git a/pages/static/pages/css/img/hero.png b/pages/static/pages/css/img/hero.png new file mode 100644 index 0000000..acd2dce Binary files /dev/null and b/pages/static/pages/css/img/hero.png differ diff --git a/pages/static/pages/css/img/hero.png:Zone.Identifier b/pages/static/pages/css/img/hero.png:Zone.Identifier new file mode 100644 index 0000000..e69de29 diff --git a/pages/static/pages/css/styles.css b/pages/static/pages/css/styles.css new file mode 100644 index 0000000..64f3439 --- /dev/null +++ b/pages/static/pages/css/styles.css @@ -0,0 +1,3 @@ +.jumbotron { + background-image: url('img/hero.png') +} \ No newline at end of file diff --git a/pages/templates/pages/base.html b/pages/templates/pages/base.html new file mode 100644 index 0000000..bd838f8 --- /dev/null +++ b/pages/templates/pages/base.html @@ -0,0 +1,49 @@ +{% load static %} + + + + + + + + + + + + + + + + + + + + {% block content %}{% endblock content %} + + + + + + + + diff --git a/pages/templates/pages/index.html b/pages/templates/pages/index.html new file mode 100644 index 0000000..4d1c80b --- /dev/null +++ b/pages/templates/pages/index.html @@ -0,0 +1,8 @@ +{% extends 'pages/base.html' %} +{% block content %} +
+
+

Class of 2023 Class Council

+

We work for you.

+
+{% endblock content %} diff --git a/pages/urls.py b/pages/urls.py new file mode 100644 index 0000000..d42afac --- /dev/null +++ b/pages/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.index, name="index") +] diff --git a/pages/views.py b/pages/views.py index 91ea44a..147f7b9 100644 --- a/pages/views.py +++ b/pages/views.py @@ -1,3 +1,5 @@ from django.shortcuts import render # Create your views here. +def index (request): + return render(request, 'pages/index.html') \ No newline at end of file