From 000bd08445cbfef0a35579d543dbad029fd9b6f9 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 25 Jun 2026 14:39:49 +0545 Subject: [PATCH] refactor(config): delete config package Remove the entire config package as part of project restructuring and migration to a new configuration system. --- config/__init__.py | 0 config/asgi.py | 11 --- config/settings/__init__.py | 0 config/settings/base.py | 134 --------------------------------- config/settings/development.py | 26 ------- config/settings/production.py | 25 ------ config/urls.py | 13 ---- config/wsgi.py | 12 --- 8 files changed, 221 deletions(-) delete mode 100644 config/__init__.py delete mode 100644 config/asgi.py delete mode 100644 config/settings/__init__.py delete mode 100644 config/settings/base.py delete mode 100644 config/settings/development.py delete mode 100644 config/settings/production.py delete mode 100644 config/urls.py delete mode 100644 config/wsgi.py diff --git a/config/__init__.py b/config/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/config/asgi.py b/config/asgi.py deleted file mode 100644 index 997f766..0000000 --- a/config/asgi.py +++ /dev/null @@ -1,11 +0,0 @@ -"""generated with djinit""" - -import os -import environ -from django.core.asgi import get_asgi_application - -env = environ.Env() -environ.Env.read_env() - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="config.settings.production")) -application = get_asgi_application() \ No newline at end of file diff --git a/config/settings/__init__.py b/config/settings/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/config/settings/base.py b/config/settings/base.py deleted file mode 100644 index a3b040b..0000000 --- a/config/settings/base.py +++ /dev/null @@ -1,134 +0,0 @@ -from pathlib import Path - -import environ - -env = environ.Env() -environ.Env.read_env() - -BASE_DIR = Path(__file__).resolve().parent.parent.parent - -THIRD_PARTY_APPS = [ - "django_tailwind_cli", - "django_htmx", -] - -USER_DEFINED_APPS = [ - "apps.accounts.apps.AccountsConfig", - "apps.projects.apps.ProjectsConfig", - "apps.finance.apps.FinanceConfig", - "apps.kanban.apps.KanbanConfig", - "apps.issues.apps.IssuesConfig", - "apps.tickets.apps.TicketsConfig", - "apps.activity.apps.ActivityConfig", -] - -BUILT_IN_APPS = [ - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", -] - -INSTALLED_APPS = BUILT_IN_APPS + THIRD_PARTY_APPS + USER_DEFINED_APPS -INSTALLED_APPS.insert(0, "jazzmin") - -MIDDLEWARE = [ - "django.middleware.security.SecurityMiddleware", - "whitenoise.middleware.WhiteNoiseMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", - "django.middleware.common.CommonMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.clickjacking.XFrameOptionsMiddleware", - "django_htmx.middleware.HtmxMiddleware", -] - -ROOT_URLCONF = "config.urls" - -TEMPLATES = [ - { - "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [BASE_DIR / "templates"], - "APP_DIRS": True, - "OPTIONS": { - "context_processors": [ - "django.template.context_processors.request", - "django.contrib.auth.context_processors.auth", - "django.contrib.messages.context_processors.messages", - ], - }, - }, -] - -WSGI_APPLICATION = "config.wsgi.application" - -AUTH_PASSWORD_VALIDATORS = [ - {"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"}, - {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"}, - {"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"}, - {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, -] - -LANGUAGE_CODE = "en-us" -TIME_ZONE = "UTC" -USE_I18N = True -USE_TZ = True - -STATIC_URL = "/static/" -STATIC_ROOT = BASE_DIR / "staticfiles" -STATICFILES_DIRS = [BASE_DIR / "static/"] - -MEDIA_URL = "/media/" -MEDIA_ROOT = BASE_DIR / "media" - -STORAGES = { - "default": {"BACKEND": "django.core.files.storage.FileSystemStorage"}, - "staticfiles": {"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"}, -} - -AUTH_USER_MODEL = "accounts.CustomUser" -DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" - -LOGIN_URL = "/accounts/login/" -LOGIN_REDIRECT_URL = "/" -LOGOUT_REDIRECT_URL = "/accounts/login/" - -SECURE_BROWSER_XSS_FILTER = True -SECURE_CONTENT_TYPE_NOSNIFF = True -X_FRAME_OPTIONS = "DENY" - -TAILWIND_CLI_VERSION = "2.7.8" -TAILWIND_CLI_USE_DAISY_UI = True -TAILWIND_CLI_CONFIG = { - "theme": { - "extend": { - "colors": { - "primary": "#DC2626", - "secondary": "#EF4444", - "accent": "#FCFECC", - } - } - }, - "daisyui": { - "themes": [ - { - "light": { - "primary": "#DC2626", - "secondary": "#EF4444", - "accent": "#FCFECC", - "neutral": "#1a1a2e", - "base-100": "#ffffff", - "base-200": "#f8fafc", - "base-300": "#e2e8f0", - "info": "#0E4D80", - "success": "#16a34a", - "warning": "#f59e0b", - "error": "#DC2626", - } - } - ] - }, -} diff --git a/config/settings/development.py b/config/settings/development.py deleted file mode 100644 index 569e13b..0000000 --- a/config/settings/development.py +++ /dev/null @@ -1,26 +0,0 @@ -from .base import * - -SECRET_KEY = "o$62pY2y3M3&!YtUG*857JA=*svOdaVFf+%veG@XZkmfD0GOm$" -DEBUG = True -ALLOWED_HOSTS = ["*"] - -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "db.sqlite3", - "OPTIONS": { - "transaction_mode": "IMMEDIATE", - "timeout": 5, - "init_command": """ - PRAGMA journal_mode=WAL; - PRAGMA synchronous=NORMAL; - PRAGMA mmap_size = 134217728; - PRAGMA journal_size_limit = 27103364; - PRAGMA cache_size=2000; - """, - }, - } -} - -EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" -SECURE_SSL_REDIRECT = False diff --git a/config/settings/production.py b/config/settings/production.py deleted file mode 100644 index 0f055bb..0000000 --- a/config/settings/production.py +++ /dev/null @@ -1,25 +0,0 @@ -from .base import * - -DEBUG = False -SECRET_KEY = env("SECRET_KEY") -ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) -DATABASES = {"default": env.db("DATABASE_URL")} - -EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" -EMAIL_HOST = env("EMAIL_HOST", default="smtp.gmail.com") -EMAIL_PORT = env.int("EMAIL_PORT", default=587) -EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", default=True) -EMAIL_HOST_USER = env("EMAIL_HOST_USER", default="") -EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD", default="") -DEFAULT_FROM_EMAIL = env("EMAIL_HOST_USER", default="") -SERVER_EMAIL = env("EMAIL_HOST_USER", default="") - -SECURE_SSL_REDIRECT = True -SECURE_HSTS_SECONDS = 31536000 -SECURE_HSTS_INCLUDE_SUBDOMAINS = True -SECURE_HSTS_PRELOAD = True -SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") -SESSION_COOKIE_SECURE = True -CSRF_COOKIE_SECURE = True - -STORAGES["staticfiles"]["BACKEND"] = "whitenoise.storage.CompressedManifestStaticFilesStorage" diff --git a/config/urls.py b/config/urls.py deleted file mode 100644 index 6a055ba..0000000 --- a/config/urls.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.contrib import admin -from django.urls import include, path - -urlpatterns = [ - path("admin/", admin.site.urls), - path("", include("apps.accounts.urls")), - path("", include("apps.projects.urls")), - path("", include("apps.kanban.urls")), - path("", include("apps.issues.urls")), - path("", include("apps.tickets.urls")), - path("", include("apps.finance.urls")), - path("", include("apps.activity.urls")), -] diff --git a/config/wsgi.py b/config/wsgi.py deleted file mode 100644 index d05554f..0000000 --- a/config/wsgi.py +++ /dev/null @@ -1,12 +0,0 @@ -"""generated with djinit""" - -import os -import environ -from django.core.wsgi import get_wsgi_application - -env = environ.Env() -environ.Env.read_env() - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="config.settings.production")) - -application = get_wsgi_application() \ No newline at end of file