feat: app inside project with custom command

This commit is contained in:
eneller
2025-03-16 15:31:45 +01:00
parent 52998fa280
commit 0589148b6f
14 changed files with 73 additions and 21 deletions

View File

@@ -14,6 +14,7 @@ from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
PROJ_DIR = BASE_DIR / 'epub2go_web'
# Quick-start development settings - unsuitable for production
@@ -37,6 +38,7 @@ INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"core",
]
MIDDLEWARE = [
@@ -55,7 +57,7 @@ TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
"epub2go_web/templates/"
PROJ_DIR / "templates/"
],
"APP_DIRS": True,
"OPTIONS": {
@@ -119,9 +121,12 @@ USE_TZ = True
STATIC_URL = "static/"
STATICFILES_DIRS = [
BASE_DIR / "epub2go_web/static",
PROJ_DIR / "static/",
]
MEDIA_URL = "media/"
MEDIA_ROOT = PROJ_DIR / "media/"
# Default primary key field type
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field