TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True LOCALE_PATHS = [ os.path.join(BASE_DIR, 'locale'), ] # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'myproject', 'site_static'), ] timestamp = get_git_changeset_timestamp(BASE_DIR) STATIC_URL = f'/static/{timestamp}/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') EMAIL_HOST = get_secret("EMAIL_HOST") EMAIL_PORT = get_secret("EMAIL_PORT") EMAIL_HOST_USER = get_secret("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = get_secret("EMAIL_HOST_PASSWORD")
USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ ## Add for template structure import os if os.environ['PROJECT_ENV'] in ['PRODUCTION', 'STAGE']: with open(BASE_DIR / 'myproject' / 'settings' / 'last-update.txt', 'r') as f: timestamp = f.readline().strip() else: from myproject.apps.core.versioning import get_git_changeset_timestamp timestamp = get_git_changeset_timestamp(BASE_DIR.parent.parent) STATIC_URL = f'/static/{timestamp}/' LOCALE_PATHS = [ BASE_DIR / 'locale', ] STATICFILES_DIRS = [ BASE_DIR / 'myproject' / 'site_static', ] STATIC_ROOT = BASE_DIR / 'static' MEDIA_ROOT = BASE_DIR / 'media' # External apps import sys