mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-29 03:20:32 +00:00
Python formatting
This commit is contained in:
parent
290a99bf17
commit
cd014e43ad
1 changed files with 3 additions and 1 deletions
|
@ -336,11 +336,13 @@ class TagField(ManyToManyField):
|
|||
|
||||
class ClearableFileInputWithWarning(ClearableFileInput):
|
||||
"""max file size warning"""
|
||||
|
||||
template_name = "widgets/clearable_file_input_with_warning.html"
|
||||
|
||||
|
||||
class CustomImageField(DjangoImageField):
|
||||
"""overwrites image field for form"""
|
||||
|
||||
widget = ClearableFileInputWithWarning
|
||||
|
||||
|
||||
|
@ -408,7 +410,7 @@ class ImageField(ActivitypubFieldMixin, models.ImageField):
|
|||
return [image_name, image_content]
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
""" special case for forms """
|
||||
"""special case for forms"""
|
||||
return super().formfield(
|
||||
**{
|
||||
"form_class": CustomImageField,
|
||||
|
|
Loading…
Reference in a new issue