mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
parent
fa54411351
commit
d81495f50c
3 changed files with 25 additions and 4 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
|
@ -5,11 +5,26 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
django-version: ['3.2', '4.1', '4.2']
|
django-version: ['3.2', '4.1', '4.2', '5.0', '5.1.*']
|
||||||
exclude:
|
exclude:
|
||||||
- python-version: 3.11
|
- python-version: 3.11
|
||||||
django-version: 3.2
|
django-version: 3.2
|
||||||
|
|
||||||
|
- python-version: 3.12
|
||||||
|
django-version: 3.2
|
||||||
|
|
||||||
|
- python-version: 3.8
|
||||||
|
django-version: 5.0
|
||||||
|
|
||||||
|
- python-version: 3.9
|
||||||
|
django-version: 5.0
|
||||||
|
|
||||||
|
- python-version: 3.8
|
||||||
|
django-version: 5.1.*
|
||||||
|
|
||||||
|
- python-version: 3.9
|
||||||
|
django-version: 5.1.*
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -23,7 +38,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install -r tests/requirements.txt
|
pip install -r tests/requirements.txt
|
||||||
pip install "Django~=${{ matrix.django-version }}.0" .
|
pip install "Django==${{ matrix.django-version }}" .
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
echo "$(python --version) / Django $(django-admin --version)"
|
echo "$(python --version) / Django $(django-admin --version)"
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ class AvatarConf(AppConf):
|
||||||
ALLOWED_FILE_EXTS = None
|
ALLOWED_FILE_EXTS = None
|
||||||
ALLOWED_MIMETYPES = None
|
ALLOWED_MIMETYPES = None
|
||||||
CACHE_TIMEOUT = 60 * 60
|
CACHE_TIMEOUT = 60 * 60
|
||||||
STORAGE = settings.DEFAULT_FILE_STORAGE
|
if hasattr(settings, "DEFAULT_FILE_STORAGE"):
|
||||||
|
STORAGE = settings.DEFAULT_FILE_STORAGE # deprecated settings
|
||||||
STORAGE_ALIAS = "default"
|
STORAGE_ALIAS = "default"
|
||||||
CLEANUP_DELETED = True
|
CLEANUP_DELETED = True
|
||||||
AUTO_GENERATE_SIZES = (DEFAULT_SIZE,)
|
AUTO_GENERATE_SIZES = (DEFAULT_SIZE,)
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,11 @@ appear on the site. Listed below are those settings:
|
||||||
Suggested safe setting: ``("image/png", "image/gif", "image/jpeg")``.
|
Suggested safe setting: ``("image/png", "image/gif", "image/jpeg")``.
|
||||||
When enabled you'll get the following error on the form upload *File content is invalid. Detected: image/tiff Allowed content types are: image/png, image/gif, image/jpg*.
|
When enabled you'll get the following error on the form upload *File content is invalid. Detected: image/tiff Allowed content types are: image/png, image/gif, image/jpg*.
|
||||||
|
|
||||||
|
.. py:data:: AVATAR_STORAGE_ALIAS
|
||||||
|
|
||||||
|
Default: 'default'
|
||||||
|
Alias of the storage backend (from STORAGES settings) to use for storing avatars.
|
||||||
|
|
||||||
|
|
||||||
Management Commands
|
Management Commands
|
||||||
-------------------
|
-------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue