mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
club: add club logo
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
parent
49b77480e6
commit
a2dc00f4e5
19
club/migrations/0010_club_logo.py
Normal file
19
club/migrations/0010_club_logo.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('club', '0009_auto_20170822_2232'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='club',
|
||||||
|
name='logo',
|
||||||
|
field=models.ImageField(null=True, upload_to='club_logos', blank=True, verbose_name='logo'),
|
||||||
|
),
|
||||||
|
]
|
@ -57,6 +57,7 @@ class Club(models.Model):
|
|||||||
'unique': _("A club with that unix name already exists."),
|
'unique': _("A club with that unix name already exists."),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
logo = models.ImageField(upload_to='club_logos', verbose_name=_('logo'), null=True, blank=True)
|
||||||
address = models.CharField(_('address'), max_length=254)
|
address = models.CharField(_('address'), max_length=254)
|
||||||
# email = models.EmailField(_('email address'), unique=True) # This should, and will be generated automatically
|
# email = models.EmailField(_('email address'), unique=True) # This should, and will be generated automatically
|
||||||
owner_group = models.ForeignKey(Group, related_name="owned_club",
|
owner_group = models.ForeignKey(Group, related_name="owned_club",
|
||||||
|
@ -337,7 +337,7 @@ class ClubEditView(ClubTabsMixin, CanEditMixin, UpdateView):
|
|||||||
"""
|
"""
|
||||||
model = Club
|
model = Club
|
||||||
pk_url_kwarg = "club_id"
|
pk_url_kwarg = "club_id"
|
||||||
fields = ['address']
|
fields = ['address', 'logo']
|
||||||
template_name = 'core/edit.jinja'
|
template_name = 'core/edit.jinja'
|
||||||
current_tab = "edit"
|
current_tab = "edit"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user