okay fine

This commit is contained in:
pacnpal
2024-11-03 17:47:26 +00:00
parent 01c6004a79
commit 27eb239e97
10020 changed files with 1935769 additions and 2364 deletions

View File

@@ -14,7 +14,6 @@ DEBUG = True
CSRF_TRUSTED_ORIGINS = ["https://beta.thrillwiki.com"]
ALLOWED_HOSTS = ["*"]
# ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'thrillwiki.com', 'beta.thrillwiki.com', '192.168.86.6', 'syn.thewesker.com']
# Application definition
INSTALLED_APPS = [
@@ -36,7 +35,6 @@ INSTALLED_APPS = [
"django_htmx",
"whitenoise",
"django_tailwind_cli",
"cities_light",
"core",
"accounts",
"companies",
@@ -44,26 +42,10 @@ INSTALLED_APPS = [
"rides",
"reviews",
"email_service",
"media.apps.MediaConfig", # Add media app
"media.apps.MediaConfig",
"moderation",
]
# Cities Light settings
CITIES_LIGHT_TRANSLATION_LANGUAGES = ["en"]
# pytCITIES_LIGHT_INCLUDE_COUNTRIES = ['US', 'CA', 'GB', 'FR', 'DE', 'ES', 'IT', 'JP', 'CN', 'AU']
CITIES_LIGHT_INCLUDE_CITY_TYPES = [
"PPL",
"PPLA",
"PPLA2",
"PPLA3",
"PPLA4",
"PPLC",
"PPLG",
"PPLL",
"PPLR",
"PPLS",
]
MIDDLEWARE = [
"django.middleware.cache.UpdateCacheMiddleware",
"django.middleware.security.SecurityMiddleware",
@@ -82,7 +64,6 @@ MIDDLEWARE = [
ROOT_URLCONF = "thrillwiki.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
@@ -94,7 +75,7 @@ TEMPLATES = [
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"moderation.context_processors.moderation_access", # Added moderation context processor
"moderation.context_processors.moderation_access",
],
},
},

View File

@@ -8,41 +8,52 @@ from .views import HomeView, SearchView
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path("admin/", admin.site.urls),
# Main app URLs
path('', HomeView.as_view(), name='home'),
path("", HomeView.as_view(), name="home"),
# Parks URLs
path('parks/', include('parks.urls', namespace='parks')),
path("parks/", include("parks.urls", namespace="parks")),
# Rides URLs
path("rides/", include("rides.urls", namespace="rides")),
# Other URLs
path('reviews/', include('reviews.urls')),
path('companies/', include('companies.urls')),
path('photos/', include('media.urls', namespace='photos')), # Add photos URLs
path('search/', SearchView.as_view(), name='search'),
path('terms/', TemplateView.as_view(template_name='pages/terms.html'), name='terms'),
path('privacy/', TemplateView.as_view(template_name='pages/privacy.html'), name='privacy'),
path("reviews/", include("reviews.urls")),
path("companies/", include("companies.urls")),
path("photos/", include("media.urls", namespace="photos")), # Add photos URLs
path("search/", SearchView.as_view(), name="search"),
path(
"terms/", TemplateView.as_view(template_name="pages/terms.html"), name="terms"
),
path(
"privacy/",
TemplateView.as_view(template_name="pages/privacy.html"),
name="privacy",
),
# Custom authentication URLs first (to override allauth defaults)
path('accounts/', include('accounts.urls')),
path("accounts/", include("accounts.urls")),
# Default allauth URLs (for social auth and other features)
path('accounts/', include('allauth.urls')),
path('accounts/email-required/', accounts_views.email_required, name='email_required'),
path("accounts/", include("allauth.urls")),
path(
"accounts/email-required/", accounts_views.email_required, name="email_required"
),
# User profile URLs
path('user/<str:username>/', accounts_views.ProfileView.as_view(), name='user_profile'),
path('profile/<str:username>/', accounts_views.ProfileView.as_view(), name='profile'),
path('settings/', accounts_views.SettingsView.as_view(), name='settings'),
path(
"user/<str:username>/",
accounts_views.ProfileView.as_view(),
name="user_profile",
),
path(
"profile/<str:username>/", accounts_views.ProfileView.as_view(), name="profile"
),
path("settings/", accounts_views.SettingsView.as_view(), name="settings"),
# Redirect /user/ to the user's profile if logged in
path('user/', accounts_views.user_redirect_view, name='user_redirect'),
path("user/", accounts_views.user_redirect_view, name="user_redirect"),
# Moderation URLs - placed after other URLs but before static/media serving
path('moderation/', include('moderation.urls', namespace='moderation')),
path('env-settings/', views***REMOVED***ironment_and_settings_view, name='environment_and_settings'),
path("moderation/", include("moderation.urls", namespace="moderation")),
path(
"env-settings/",
views***REMOVED***ironment_and_settings_view,
name="environment_and_settings",
),
]
# Serve static files in development
@@ -50,5 +61,5 @@ 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'
handler404 = "thrillwiki.views.handler404"
handler500 = "thrillwiki.views.handler500"