File tree Expand file tree Collapse file tree 5 files changed +19
-81
lines changed
Expand file tree Collapse file tree 5 files changed +19
-81
lines changed Original file line number Diff line number Diff line change 6363 make static
6464 make tests
6565 - name : Run code coverage
66- if : matrix.python-version == '3.12' && matrix.django-version == 'django52 '
66+ if : matrix.python-version == '3.12' && matrix.django-version == 'django42 '
6767 uses : codecov/codecov-action@v5
6868 with :
6969 flags : unittests
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 462462EXTRA_APPS = []
463463SESSION_EXPIRE_AT_BROWSER_CLOSE = False
464464
465- DEFAULT_FILE_STORAGE_BACKEND = "django.core.files.storage.FileSystemStorage"
466- STATICFILES_STORAGE_BACKEND = "django.contrib.staticfiles.storage.StaticFilesStorage"
467-
468- if django .VERSION >= (4 , 2 ):
469- # Use new STORAGES setting (available from Django 4.2)
470- STORAGES = {
471- "default" : {
472- "BACKEND" : DEFAULT_FILE_STORAGE_BACKEND ,
473- },
474- "staticfiles" : {
475- "BACKEND" : STATICFILES_STORAGE_BACKEND ,
476- },
477- }
478- else :
479- # For Django < 4.2 or packages still using legacy settings
480- DEFAULT_FILE_STORAGE = DEFAULT_FILE_STORAGE_BACKEND
481- STATICFILES_STORAGE = STATICFILES_STORAGE_BACKEND
465+ STORAGES = {
466+ "default" : {
467+ "BACKEND" : "django.core.files.storage.FileSystemStorage" ,
468+ },
469+ "staticfiles" : {
470+ "BACKEND" : "django.contrib.staticfiles.storage.StaticFilesStorage" ,
471+ },
472+ }
482473
483474CACHES = {
484475 "default" : {
Original file line number Diff line number Diff line change 4343EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
4444EMAIL_FILE_PATH = "/tmp/credentials-emails"
4545
46- DEFAULT_FILE_STORAGE = os .environ .get ("DEFAULT_FILE_STORAGE" , "django.core.files.storage.FileSystemStorage" )
46+ DEFAULT_FILE_STORAGE = os .environ .get (STORAGES [ "default" ][ "BACKEND" ] , "django.core.files.storage.FileSystemStorage" )
4747MEDIA_URL = os .environ .get ("MEDIA_URL" , "/media/" )
4848
49- STATICFILES_STORAGE = os .environ .get ("STATICFILES_STORAGE" , "django.contrib.staticfiles.storage.StaticFilesStorage" )
49+ STATICFILES_STORAGE = os .environ .get (STORAGES [ "staticfiles" ][ "BACKEND" ] , "django.contrib.staticfiles.storage.StaticFilesStorage" )
5050STATIC_URL = os .environ .get ("STATIC_URL" , "/static/" )
5151
5252# OAuth2 variables specific to social-auth/SSO login use case.
Original file line number Diff line number Diff line change 3636# Local Directories
3737TEST_ROOT = path ("test_root" )
3838
39- DEFAULT_FILE_STORAGE_BACKEND = "django.core.files.storage.FileSystemStorage"
40- STATICFILES_STORAGE_BACKEND = "django.contrib.staticfiles.storage.StaticFilesStorage"
41-
42- if django .VERSION >= (4 , 2 ):
43- # Use new STORAGES setting (available from Django 4.2)
44- STORAGES = {
45- "default" : {
46- "BACKEND" : DEFAULT_FILE_STORAGE_BACKEND ,
47- },
48- "staticfiles" : {
49- "BACKEND" : STATICFILES_STORAGE_BACKEND ,
50- },
51- }
52- else :
53- # For Django < 4.2 or packages still using legacy settings
54- DEFAULT_FILE_STORAGE = DEFAULT_FILE_STORAGE_BACKEND
55- STATICFILES_STORAGE = STATICFILES_STORAGE_BACKEND
56-
39+ STORAGES = {
40+ "default" : {
41+ "BACKEND" : "django.core.files.storage.FileSystemStorage" ,
42+ },
43+ "staticfiles" : {
44+ "BACKEND" : "django.contrib.staticfiles.storage.StaticFilesStorage" ,
45+ },
46+ }
5747MEDIA_ROOT = str (TEST_ROOT / "uploads" )
5848MEDIA_URL = "/static/uploads/"
5949
You can’t perform that action at this time.
0 commit comments