1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

profile picture update view is working

This commit is contained in:
Pierre-antoine Comby
2020-03-04 16:34:12 +01:00
parent c4198a64af
commit fd74080ce3
6 changed files with 103 additions and 13 deletions

View File

@ -23,15 +23,11 @@ class AliasForm(forms.ModelForm):
self.fields["name"].widget.attrs={"placeholder":_('New Alias')}
class ImageForm(forms.ModelForm):
class Meta:
model = Note
fields = ('display_image',)
class ImageForm(forms.Form):
image = forms.ImageField(required = False,
label=_('select an image'),
help_text=_('Maximal size: 2MB'))
def __init__(self,*args,**kwargs):
super().__init__(*args,**kwargs)
self.fields["display_image"].label = _("select an image")
self.fields["display_image"].widget.attrs={"help_text":_('Maximal size: 2MB')}
class TransactionTemplateForm(forms.ModelForm):
class Meta: