mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Compare commits
2 commits
ac666b4bb2
...
fc10199685
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc10199685 | ||
|
|
e4fadcaef2 |
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.0
|
||||
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