mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Merge 221bf4e21f into 12e4745f29
This commit is contained in:
commit
094d078e4f
3 changed files with 6 additions and 5 deletions
|
|
@ -6,13 +6,13 @@ repos:
|
|||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: "7.0.0"
|
||||
rev: "8.0.1"
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black"]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 25.12.0
|
||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||
rev: 26.3.1
|
||||
hooks:
|
||||
- id: black
|
||||
args: [--target-version=py310]
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ def avatar_path_handler(
|
|||
# Filename already stored in database
|
||||
filename = instance.avatar.name
|
||||
if ext:
|
||||
(root, oldext) = os.path.splitext(filename)
|
||||
root, oldext = os.path.splitext(filename)
|
||||
filename = root + "." + ext.lower()
|
||||
else:
|
||||
# File doesn't exist yet
|
||||
(root, oldext) = os.path.splitext(filename)
|
||||
root, oldext = os.path.splitext(filename)
|
||||
if settings.AVATAR_HASH_FILENAMES:
|
||||
if settings.AVATAR_RANDOMIZE_HASHES:
|
||||
root = binascii.hexlify(os.urandom(16)).decode("ascii")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue