mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 06:11:07 -05:00
fixed the damn discord button
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38,6 +38,7 @@ INSTALLED_APPS = [
|
||||
'django_htmx',
|
||||
'whitenoise',
|
||||
'django_tailwind_cli',
|
||||
'cities_light',
|
||||
|
||||
# Local apps
|
||||
'core',
|
||||
@@ -51,6 +52,11 @@ INSTALLED_APPS = [
|
||||
'moderation',
|
||||
]
|
||||
|
||||
# Cities Light settings
|
||||
CITIES_LIGHT_TRANSLATION_LANGUAGES = ['en']
|
||||
CITIES_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',
|
||||
@@ -113,7 +119,7 @@ CACHES = {
|
||||
}
|
||||
}
|
||||
|
||||
CACHE_MIDDLEWARE_SECONDS = 300 # 5 minutes
|
||||
CACHE_MIDDLEWARE_SECONDS = 1 # 5 minutes
|
||||
CACHE_MIDDLEWARE_KEY_PREFIX = 'thrillwiki'
|
||||
|
||||
# Password validation
|
||||
@@ -139,10 +145,8 @@ 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 = [BASE_DIR / "static"]
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
|
||||
# Media files
|
||||
@@ -209,9 +213,9 @@ FORWARD_EMAIL_BASE_URL = 'https://api.forwardemail.net'
|
||||
AUTH_USER_MODEL = 'accounts.User'
|
||||
|
||||
# Tailwind configuration
|
||||
TAILWIND_CLI_CONFIG_FILE = os.path.join(BASE_DIR, 'tailwind.config.js')
|
||||
TAILWIND_CLI_SRC_CSS = os.path.join(BASE_DIR, 'assets/css/src/input.css')
|
||||
TAILWIND_CLI_DIST_CSS = os.path.join(BASE_DIR, 'static/css/tailwind.css')
|
||||
TAILWIND_CLI_CONFIG_FILE = os.path.join(BASE_DIR, "tailwind.config.js")
|
||||
TAILWIND_CLI_SRC_CSS = os.path.join(BASE_DIR, "static/css/src/input.css")
|
||||
TAILWIND_CLI_DIST_CSS = os.path.join(BASE_DIR, "static/css/tailwind.css")
|
||||
|
||||
# Cloudflare Turnstile settings
|
||||
TURNSTILE_SITE_KEY = '0x4AAAAAAAyqVp3RjccrC9Kz'
|
||||
|
||||
@@ -5,6 +5,7 @@ from django.conf.urls.static import static
|
||||
from accounts import views as accounts_views
|
||||
from django.views.generic import TemplateView
|
||||
from .views import HomeView, SearchView
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
@@ -40,6 +41,7 @@ urlpatterns = [
|
||||
|
||||
# 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'),
|
||||
]
|
||||
|
||||
# Serve static files in development
|
||||
|
||||
@@ -4,6 +4,9 @@ from django.db.models import Count, Q
|
||||
from parks.models import Park
|
||||
from rides.models import Ride
|
||||
from companies.models import Company, Manufacturer
|
||||
from django.conf import settings
|
||||
import os
|
||||
|
||||
|
||||
def handler404(request, exception):
|
||||
return render(request, '404.html', status=404)
|
||||
@@ -73,3 +76,14 @@ class SearchView(TemplateView):
|
||||
).prefetch_related('rides')[:10]
|
||||
|
||||
return context
|
||||
def environment_and_settings_view(request):
|
||||
# Get all environment variables
|
||||
env_vars = dict(os***REMOVED***iron)
|
||||
|
||||
# Get all Django settings as a dictionary
|
||||
settings_vars = {setting: getattr(settings, setting) for setting in dir(settings) if setting.isupper()}
|
||||
|
||||
return render(request, 'environment_and_settings.html', {
|
||||
'env_vars': env_vars,
|
||||
'settings_vars': settings_vars
|
||||
})
|
||||
Reference in New Issue
Block a user