diff --git a/config/settings.py b/config/settings.py index 3a8298f..14eebd4 100644 --- a/config/settings.py +++ b/config/settings.py @@ -138,19 +138,13 @@ MEDIA_ROOT = BASE_DIR / 'media' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -# Import local settings -try: - from .local_settings import * -except ImportError: - pass - # Session lifetime 1 year SESSION_COOKIE_AGE = 31556000 # Gotify -#GOTIFY_URL = "https://gotify....." -#GOTIFY_TOKEN = "topsecret" +# GOTIFY_URL = "https://gotify....." +# GOTIFY_TOKEN = "topsecret" LOGGING = { 'version': 1, @@ -166,10 +160,10 @@ LOGGING = { }, }, 'handlers': { - #'gotify': { + # 'gotify': { # 'level': 'ERROR', - # 'class': 'gallery.logging_handlers.GotifyHandler', - #}, + # 'class': 'gallery.logging_handlers.GotifyHandler', + # }, 'error_file': { 'level': 'ERROR', 'class': 'logging.FileHandler', @@ -185,10 +179,31 @@ LOGGING = { }, 'loggers': { 'django': { - #'handlers': ['error_file', 'warning_file', 'gotify'], + # 'handlers': ['error_file', 'warning_file', 'gotify'], 'handlers': ['error_file', 'warning_file'], 'level': 'WARNING', 'propagate': True, }, }, -} \ No newline at end of file +} + +ABOUT_PAGE_SETTINGS = { + + "title": "Muistox gallery", + "description": "Just another wannabe photographer...", + "profile_image": "img/default.png", + + "contact_email": "muistox@gallery.invalid", + + "bluesky_url": "https://bsky.app/", + "twitter_url": "https://twitter.com/", + "instagram_url": "https://www.instagram.com/", + +} + + +# Import local settings +try: + from .local_settings import * +except ImportError: + pass diff --git a/gallery/migrations/0001_initial.py b/gallery/migrations/0001_initial.py index c9535d6..e27c6f7 100644 --- a/gallery/migrations/0001_initial.py +++ b/gallery/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.4 on 2025-02-23 15:54 +# Generated by Django 5.1.7 on 2025-03-28 19:11 import datetime import django.db.models.deletion @@ -56,7 +56,7 @@ class Migration(migrations.Migration): name='Photo', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('slug', models.CharField(editable=False, max_length=15, verbose_name='Photo Slug')), + ('slug', models.CharField(editable=False, max_length=15, unique=True, verbose_name='Photo Slug')), ('photo', models.ImageField(height_field='height', upload_to=gallery.models.photo.get_upload_path, verbose_name='Photo', width_field='width')), ('width', models.PositiveIntegerField(default=0, editable=False, verbose_name='Photo Width')), ('height', models.PositiveIntegerField(default=0, editable=False, verbose_name='Photo Height')), @@ -88,4 +88,8 @@ class Migration(migrations.Migration): 'verbose_name_plural': 'Redirs', }, ), + migrations.AddConstraint( + model_name='photo', + constraint=models.UniqueConstraint(fields=('slug',), name='unique_photo_slug'), + ), ] diff --git a/gallery/templates/gallery/about.html b/gallery/templates/gallery/about.html index 157d51a..54c233a 100644 --- a/gallery/templates/gallery/about.html +++ b/gallery/templates/gallery/about.html @@ -1,5 +1,6 @@ {% extends "base_dark.html" %} -{% load top_tags %} +{% load static %} +{% load stats %} {% block title %} Gallery : About{% endblock %} @@ -7,17 +8,48 @@ {% block content %} -
+ {{ about.description }} +
+ + ++ Contact: + + {{ about.contact_email }} + +
+ + +