Skip to content

Commit 2cbfec9

Browse files
committed
fix Django 5.1 error, test in Django 5.1
1 parent a9ada9f commit 2cbfec9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
python-version: ['3.8', '3.9', '3.10', '3.11']
9-
django-version: ['3.2', '4.1', '4.2']
9+
django-version: ['3.2', '4.1', '4.2', '5.0', '5.1.*']
1010
exclude:
1111
- python-version: 3.11
1212
django-version: 3.2
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
pip install -r requirements.txt
2525
pip install -r tests/requirements.txt
26-
pip install "Django~=${{ matrix.django-version }}.0" .
26+
pip install "Django~=${{ matrix.django-version }}" .
2727
- name: Run Tests
2828
run: |
2929
echo "$(python --version) / Django $(django-admin --version)"

avatar/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class AvatarConf(AppConf):
2424
ALLOWED_FILE_EXTS = None
2525
ALLOWED_MIMETYPES = None
2626
CACHE_TIMEOUT = 60 * 60
27-
STORAGE = settings.DEFAULT_FILE_STORAGE
27+
if hasattr(settings, "DEFAULT_FILE_STORAGE"):
28+
STORAGE = settings.DEFAULT_FILE_STORAGE
2829
STORAGE_ALIAS = "default"
2930
CLEANUP_DELETED = True
3031
AUTO_GENERATE_SIZES = (DEFAULT_SIZE,)

0 commit comments

Comments
 (0)