Skip to content

Commit

Permalink
Updates settings and packages to remove deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fako committed Jun 2, 2024
1 parent 614cbe7 commit 628b00e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/datascope/requirements/minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ invoke==2.2.0
sentry-sdk==1.44.1
ipdb==0.13.13
ipython==8.22.2
django-debug-toolbar==3.2.2
django-debug-toolbar==4.4.2
wheel==0.43.0
pytest-django==4.8.0
18 changes: 13 additions & 5 deletions src/datascope/settings_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,30 @@
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
DATETIME_FORMAT = 'd-m-y H:i:s/u' # default would get overridden by L18N

# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = False


# Storages
# https://docs.djangoproject.com/en/4.2/ref/settings/#storages

STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = URL_TO_PROJECT + 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'datascope', 'statics')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
WHITENOISE_INDEX_FILE = 'index.html'
MEDIA_URL = URL_TO_PROJECT + 'media/'
MEDIA_ROOT = os.path.join(DATAGROWTH_DATA_DIR, "media")
Expand Down

0 comments on commit 628b00e

Please sign in to comment.