remove backend

This commit is contained in:
pacnpal
2025-09-21 20:19:12 -04:00
parent 9e724bd795
commit f3c59ad6ff
557 changed files with 1739 additions and 4836 deletions

View File

@@ -0,0 +1,39 @@
"""
Database configuration for thrillwiki project.
"""
import environ
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent.parent
env = environ.Env(
DATABASE_URL=(
str,
"postgis://thrillwiki_user:thrillwiki@localhost:5432/thrillwiki_test_db",
),
GDAL_LIBRARY_PATH=(str, "/nix/store/c5y314zvvrbr9lx4wh06ibl1b5c07x92-gdal-3.11.0/lib/libgdal.so"),
GEOS_LIBRARY_PATH=(str, "/nix/store/r5sgxqxrwfvms97v4v239qbivwsmdfjf-geos-3.13.1/lib/libgeos_c.so"),
CACHE_URL=(str, "locmemcache://"),
CACHE_MIDDLEWARE_SECONDS=(int, 300),
CACHE_MIDDLEWARE_KEY_PREFIX=(str, "thrillwiki"),
)
# Database configuration
db_config = env.db("DATABASE_URL")
# Switch back to PostgreSQL - GeoDjango issues resolved separately
DATABASES = {
"default": db_config,
}
# GeoDjango Settings - Environment specific with fallbacks
GDAL_LIBRARY_PATH = env("GDAL_LIBRARY_PATH")
GEOS_LIBRARY_PATH = env("GEOS_LIBRARY_PATH")
# Cache settings
CACHES = {"default": env.cache("CACHE_URL")}
CACHE_MIDDLEWARE_SECONDS = env.int("CACHE_MIDDLEWARE_SECONDS")
CACHE_MIDDLEWARE_KEY_PREFIX = env("CACHE_MIDDLEWARE_KEY_PREFIX")