Add static root directory to config

This commit is contained in:
Kumi 2022-08-02 10:36:53 +02:00
parent b119f1ef71
commit 6dea5435d2
Signed by: kumi
GPG key ID: 5D1CE6AF1805ECA2
2 changed files with 2 additions and 0 deletions

View file

@ -1,6 +1,7 @@
[App] [App]
Debug = 0 Debug = 0
Hosts = ["kumidc.local"] Hosts = ["kumidc.local"]
# StaticDir = /var/www/html/kumidc/static
# [MySQL] # [MySQL]
# Database = kumidc # Database = kumidc

View file

@ -120,6 +120,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.0/howto/static-files/ # https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/' STATIC_URL = 'static/'
STATIC_ROOT = CONFIG_FILE.config.get("App", "StaticDir", fallback=BASE_DIR / "static")
# Default primary key field type # Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field