feat: Implement ride management views and utility functions

- Added functions for checking user privileges, handling photo uploads, preparing form data, and managing form errors.
- Created views for listing, creating, updating, and displaying rides, including category-specific views.
- Integrated submission handling for ride changes and improved user feedback through messages.
- Enhanced data handling with appropriate context and queryset management for better performance and usability.
This commit is contained in:
pacnpal
2024-11-04 05:25:53 +00:00
parent ae913e757a
commit 01e0a609d2
29 changed files with 1087 additions and 925 deletions

View File

@@ -1,12 +1,12 @@
# Django settings for thrillwiki project.
"""
Django settings for thrillwiki project.
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-=0)^0#h#k$0@$8$ys=^$0#h#k$0@$8$ys=^"
# SECURITY WARNING: don't run with debug turned on in production!
@@ -46,6 +46,7 @@ INSTALLED_APPS = [
"moderation",
"history_tracking",
"designers",
"analytics",
]
MIDDLEWARE = [
@@ -62,6 +63,7 @@ MIDDLEWARE = [
"django.middleware.cache.FetchFromCacheMiddleware",
"simple_history.middleware.HistoryRequestMiddleware",
"django_htmx.middleware.HtmxMiddleware",
"analytics.middleware.PageViewMiddleware", # Add our page view tracking
]
ROOT_URLCONF = "thrillwiki.urls"