Add new JavaScript and GIF assets for enhanced UI features

- Introduced a new loading indicator GIF to improve user experience during asynchronous operations.
- Added jQuery Ajax Queue plugin to manage queued Ajax requests, ensuring that new requests wait for previous ones to complete.
- Implemented jQuery Autocomplete plugin for enhanced input fields, allowing users to receive suggestions as they type.
- Included jQuery Bgiframe plugin to ensure proper rendering of elements in Internet Explorer 6.
This commit is contained in:
pacnpal
2025-08-20 12:31:33 -04:00
parent bead0654df
commit 69c07d1381
16 changed files with 1452 additions and 58 deletions

View File

@@ -2,10 +2,13 @@
Local development settings for thrillwiki project.
"""
import logging
from .base import *
from ..settings import database
from ..settings import email # Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import security # Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
# Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import email
# Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
from ..settings import security
from .base import env # Import env for environment variable access
# Import database configuration
@@ -24,9 +27,8 @@ CSRF_TRUSTED_ORIGINS = [
"https://beta.thrillwiki.com",
]
# GeoDjango Settings for macOS development
GDAL_LIBRARY_PATH = env('GDAL_LIBRARY_PATH', default="/opt/homebrew/lib/libgdal.dylib")
GEOS_LIBRARY_PATH = env('GEOS_LIBRARY_PATH', default="/opt/homebrew/lib/libgeos_c.dylib")
GDAL_LIBRARY_PATH = "/opt/homebrew/lib/libgdal.dylib"
GEOS_LIBRARY_PATH = "/opt/homebrew/lib/libgeos_c.dylib"
# Local cache configuration
LOC_MEM_CACHE_BACKEND = "django.core.cache.backends.locmem.LocMemCache"
@@ -69,6 +71,7 @@ DEVELOPMENT_APPS = [
'silk',
'debug_toolbar',
'nplusone.ext.django',
'django_extensions',
]
# Add development apps if available
@@ -94,17 +97,19 @@ for middleware in DEVELOPMENT_MIDDLEWARE:
INTERNAL_IPS = ['127.0.0.1', '::1']
# Silk configuration for development
SILKY_PYTHON_PROFILER = False # Disable profiler to avoid silk_profile installation issues
# Disable profiler to avoid silk_profile installation issues
SILKY_PYTHON_PROFILER = False
SILKY_PYTHON_PROFILER_BINARY = False # Disable binary profiler
# SILKY_PYTHON_PROFILER_RESULT_PATH = BASE_DIR / 'profiles' # Not needed when profiler is disabled
SILKY_PYTHON_PROFILER_RESULT_PATH = BASE_DIR / \
'profiles' # Not needed when profiler is disabled
SILKY_AUTHENTICATION = True # Require login to access Silk
SILKY_AUTHORISATION = True # Enable authorization
SILKY_MAX_REQUEST_BODY_SIZE = -1 # Don't limit request body size
SILKY_MAX_RESPONSE_BODY_SIZE = 1024 # Limit response body size to 1KB for performance
# Limit response body size to 1KB for performance
SILKY_MAX_RESPONSE_BODY_SIZE = 1024
SILKY_META = True # Record metadata about requests
# NPlusOne configuration
import logging
NPLUSONE_LOGGER = logging.getLogger('nplusone')
NPLUSONE_LOG_LEVEL = logging.WARN

View File

@@ -2,21 +2,27 @@
Production settings for thrillwiki project.
"""
from . import base # Import the module and use its members, e.g., base.BASE_DIR, base***REMOVED***
from ..settings import database # Import the module and use its members, e.g., database.DATABASES
from ..settings import email # Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import security # Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
from ..settings import email # Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import security # Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
# Import the module and use its members, e.g., base.BASE_DIR, base***REMOVED***
from . import base
# Import the module and use its members, e.g., database.DATABASES
from ..settings import database
# Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import email
# Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
from ..settings import security
# Import the module and use its members, e.g., email.EMAIL_HOST
from ..settings import email
# Import the module and use its members, e.g., security.SECURE_HSTS_SECONDS
from ..settings import security
# Production settings
DEBUG = False
# Allowed hosts must be explicitly set in production
ALLOWED_HOSTS = base***REMOVED***('ALLOWED_HOSTS')
ALLOWED_HOSTS = base.env.list('ALLOWED_HOSTS')
# CSRF trusted origins for production
CSRF_TRUSTED_ORIGINS = base***REMOVED***('CSRF_TRUSTED_ORIGINS', default=[])
CSRF_TRUSTED_ORIGINS = base.env.list('CSRF_TRUSTED_ORIGINS')
# Security settings for production
SECURE_SSL_REDIRECT = True
@@ -80,18 +86,18 @@ LOGGING = {
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# Cache settings for production (Redis recommended)
if base***REMOVED***('REDIS_URL', default=None):
redis_url = base.env.str('REDIS_URL', default=None)
if redis_url:
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': base***REMOVED***('REDIS_URL'),
'LOCATION': redis_url,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
}
}
}
# Use Redis for sessions in production
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_CACHE_ALIAS = 'default'