mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
clubs: un champ plus joli pour la short_description, crack vas être content
This commit is contained in:
parent
9a9eb52768
commit
5a6c7aaadf
@ -51,6 +51,16 @@ from django.conf import settings
|
|||||||
# Custom forms
|
# Custom forms
|
||||||
|
|
||||||
|
|
||||||
|
class ClubEditForm(forms.ModelForm):
|
||||||
|
class Meta:
|
||||||
|
model = Club
|
||||||
|
fields = ['address', 'logo', 'short_description']
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(ClubEditForm, self).__init__(*args, **kwargs)
|
||||||
|
self.fields["short_description"].widget = forms.Textarea()
|
||||||
|
|
||||||
|
|
||||||
class MailingForm(forms.ModelForm):
|
class MailingForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Mailing
|
model = Mailing
|
||||||
@ -410,7 +420,7 @@ class ClubEditView(ClubTabsMixin, CanEditMixin, UpdateView):
|
|||||||
"""
|
"""
|
||||||
model = Club
|
model = Club
|
||||||
pk_url_kwarg = "club_id"
|
pk_url_kwarg = "club_id"
|
||||||
fields = ['address', 'logo', 'short_description']
|
form_class = ClubEditForm
|
||||||
template_name = 'core/edit.jinja'
|
template_name = 'core/edit.jinja'
|
||||||
current_tab = "edit"
|
current_tab = "edit"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user