From e906a7f6de488cd9ab04cd5c0e2d3f3dcce6f1a2 Mon Sep 17 00:00:00 2001 From: jvs Date: Fri, 24 Jan 2025 16:35:40 +0100 Subject: [PATCH] Restructure of Static Files --- core/accounts/static/accounts/css/base.css | 3 +++ .../accounts/static/accounts}/css/login.css | 0 core/accounts/templates/accounts/base.html | 15 +++++++++++++++ core/accounts/templates/accounts/home.html | 2 ++ core/accounts/templates/accounts/login.html | 2 +- core/accounts/templates/accounts/register.html | 5 +++++ core/core/settings.py | 2 +- static/css/accounts-base.css | 3 +++ 8 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 core/accounts/static/accounts/css/base.css rename {static => core/accounts/static/accounts}/css/login.css (100%) create mode 100644 core/accounts/templates/accounts/base.html create mode 100644 core/accounts/templates/accounts/register.html create mode 100644 static/css/accounts-base.css diff --git a/core/accounts/static/accounts/css/base.css b/core/accounts/static/accounts/css/base.css new file mode 100644 index 0000000..5903b5f --- /dev/null +++ b/core/accounts/static/accounts/css/base.css @@ -0,0 +1,3 @@ +* { + background-color: red; +} \ No newline at end of file diff --git a/static/css/login.css b/core/accounts/static/accounts/css/login.css similarity index 100% rename from static/css/login.css rename to core/accounts/static/accounts/css/login.css diff --git a/core/accounts/templates/accounts/base.html b/core/accounts/templates/accounts/base.html new file mode 100644 index 0000000..f9645c2 --- /dev/null +++ b/core/accounts/templates/accounts/base.html @@ -0,0 +1,15 @@ +{% load static %} + + + + + + {% block title %}{% endblock %} + + + + + {% block content %} + {% endblock %} + + \ No newline at end of file diff --git a/core/accounts/templates/accounts/home.html b/core/accounts/templates/accounts/home.html index 044c29b..d61e86c 100644 --- a/core/accounts/templates/accounts/home.html +++ b/core/accounts/templates/accounts/home.html @@ -1,8 +1,10 @@ +{% load static %} + Home diff --git a/core/accounts/templates/accounts/login.html b/core/accounts/templates/accounts/login.html index 8919c66..45f0642 100644 --- a/core/accounts/templates/accounts/login.html +++ b/core/accounts/templates/accounts/login.html @@ -5,7 +5,7 @@ Login - +
diff --git a/core/accounts/templates/accounts/register.html b/core/accounts/templates/accounts/register.html new file mode 100644 index 0000000..3ebdc72 --- /dev/null +++ b/core/accounts/templates/accounts/register.html @@ -0,0 +1,5 @@ +{% extends 'accounts/base.html' %} +{% block title %}Registrierung{% endblock %} +{% block content %} +

Register

+{% endblock %} \ No newline at end of file diff --git a/core/core/settings.py b/core/core/settings.py index 7afaca6..601a3fb 100644 --- a/core/core/settings.py +++ b/core/core/settings.py @@ -116,7 +116,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/5.1/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = '/static/' # Default primary key field type # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field diff --git a/static/css/accounts-base.css b/static/css/accounts-base.css new file mode 100644 index 0000000..5903b5f --- /dev/null +++ b/static/css/accounts-base.css @@ -0,0 +1,3 @@ +* { + background-color: red; +} \ No newline at end of file