This commit is contained in:
pacnpal
2024-10-29 01:09:14 -04:00
parent 74a1b730b9
commit 158f25b24b
195 changed files with 5000 additions and 1213 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -35,6 +35,7 @@ INSTALLED_APPS = [
'django_filters',
'django_htmx',
'whitenoise',
'django_tailwind_cli',
# Local apps
'core',
@@ -44,7 +45,7 @@ INSTALLED_APPS = [
'rides',
'reviews',
'email_service',
'media', # Added media app
'media',
]
MIDDLEWARE = [
@@ -60,6 +61,7 @@ MIDDLEWARE = [
'allauth.account.middleware.AccountMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'simple_history.middleware.HistoryRequestMiddleware',
'django_htmx.middleware.HtmxMiddleware', # Added HTMX middleware
]
ROOT_URLCONF = 'thrillwiki.urls'
@@ -132,8 +134,10 @@ USE_I18N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATIC_URL = 'static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# Media files
@@ -199,5 +203,7 @@ FORWARD_EMAIL_BASE_URL = 'https://api.forwardemail.net'
# Custom User Model
AUTH_USER_MODEL = 'accounts.User'
# WhiteNoise configuration
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# Tailwind configuration
TAILWIND_CLI_CONFIG = os.path.join(BASE_DIR, 'tailwind.config.js')
TAILWIND_CLI_SRC = os.path.join(BASE_DIR, 'assets/css/src/input.css')
TAILWIND_CLI_OUT = os.path.join(BASE_DIR, 'static/css/tailwind.css')

View File

@@ -34,7 +34,12 @@ urlpatterns = [
# Include remaining accounts URLs
path('', include('accounts.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
]
# Serve static files in development
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
handler404 = 'thrillwiki.views.handler404'
handler500 = 'thrillwiki.views.handler500'