Skip to content
Snippets Groups Projects
Commit dcc1a6c6 authored by Tobias Mieves's avatar Tobias Mieves :sparkles:
Browse files

New Changes

parent 209f11ff
No related branches found
No related tags found
No related merge requests found
Pipeline #225748 passed with warnings
...@@ -145,9 +145,12 @@ cython_debug/ ...@@ -145,9 +145,12 @@ cython_debug/
**/db.sqlite3 **/db.sqlite3
/db/db.sqlite3 /db/db.sqlite3
/staticfiles/ /staticfiles/
/static/core/css/output.css
**/node_modules/
# Apps # Apps
wedding/ wedding/
wishlist/ wishlist/
trips/ trips/
/static/core/css/output.css thw/
...@@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/4.1/topics/settings/ ...@@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/4.1/topics/settings/
For the full list of settings and their values, see For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.1/ref/settings/ https://docs.djangoproject.com/en/4.1/ref/settings/
""" """
from os import environ from os import environ
from pathlib import Path from pathlib import Path
...@@ -40,7 +41,8 @@ INSTALLED_APPS = [ ...@@ -40,7 +41,8 @@ INSTALLED_APPS = [
"whitenoise.runserver_nostatic", "whitenoise.runserver_nostatic",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"django.contrib.humanize", "django.contrib.humanize",
"{{app_to_install}}", "django.forms",
"thw",
] ]
MIDDLEWARE = [ MIDDLEWARE = [
...@@ -56,6 +58,7 @@ MIDDLEWARE = [ ...@@ -56,6 +58,7 @@ MIDDLEWARE = [
ROOT_URLCONF = "core.urls" ROOT_URLCONF = "core.urls"
FORM_RENDERER = "django.forms.renderers.TemplatesSetting"
TEMPLATES = [ TEMPLATES = [
{ {
"BACKEND": "django.template.backends.django.DjangoTemplates", "BACKEND": "django.template.backends.django.DjangoTemplates",
...@@ -117,7 +120,10 @@ USE_TZ = True ...@@ -117,7 +120,10 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/ # https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = "static/" STATIC_URL = "static/"
STATICFILES_DIRS = (str(BASE_DIR.joinpath("static")), str(BASE_DIR.joinpath("{{app_to_install}}/static"))) STATICFILES_DIRS = (
str(BASE_DIR.joinpath("static")),
str(BASE_DIR.joinpath("thw/static")),
)
STATIC_ROOT = str(BASE_DIR.joinpath("staticfiles")) STATIC_ROOT = str(BASE_DIR.joinpath("staticfiles"))
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
MEDIA_ROOT = BASE_DIR.joinpath("media") MEDIA_ROOT = BASE_DIR.joinpath("media")
......
"""wedding URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from core import settings from core import settings
from django.contrib import admin from django.contrib import admin
from django.urls import path, include, re_path from django.urls import path, include, re_path
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</a> </a>
{% endblock %} {% endblock %}
</div> </div>
<div class="flex-none hidden lg:block z-10"> <div class="flex-none hidden lg:block z-[60]">
<ul class="menu menu-horizontal"> <ul class="menu menu-horizontal">
{% block navbar_links %} {% block navbar_links %}
<li><a>Item 1</a></li> <li><a>Item 1</a></li>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
{% endblock %} {% endblock %}
</main> </main>
</div> </div>
<div class="drawer-side"> <div class="drawer-side z-[60]">
<label for="drawer" class="drawer-overlay"></label> <label for="drawer" class="drawer-overlay"></label>
<ul class="menu p-4 w-80 min-h-full bg-base-200"> <ul class="menu p-4 w-80 min-h-full bg-base-200">
{% block sidebar_links %} {% block sidebar_links %}
......
{{ errors }}
{% if errors and not fields %}
<div>{% for field in hidden_fields %}{{ field }}{% endfor %}</div>
{% endif %}
{% for field, errors in fields %}
<div class="form-control w-full min-w-fit max-w-sm m-2">
{% if field.label %}
<div class="label">
<span class="label-text">{{ field.label_tag }}</span>
</div>
{% endif %}
{{ field }}
{% if field.help_text %}
<div class="label">
{% if errors %}
<span class="label-text-alt text-error">{{ errors }}</span>
{% else %}
<span class="label-text-alt">{{ field.help_text|safe }}</span>
{% endif %}
</div>
{% endif %}
{% if forloop.last %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
{% endif %}
</div>
{% endfor %}
{% if not fields and not errors %}
{% for field in hidden_fields %}{{ field }}{% endfor %}
{% endif %}
<input type="{{ widget.type }}" name="{{ widget.name }}"{% if widget.value != None %} value="
{{ widget.value|stringformat:'s' }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}
class="input input-bordered w-full">
<select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}
class="select select-bordered w-full">
{% for group_name, group_choices, group_index in widget.optgroups %}
{% if group_name %}
<optgroup label="{{ group_name }}">
{% endif %}
{% for option in group_choices %}
{% include option.template_name with widget=option %}
{% endfor %}
{% if group_name %}
</optgroup>
{% endif %}
{% endfor %}
</select>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment