forked from DGNum/gestioCOF
Ajout d'images aux événements
This commit is contained in:
parent
b75c639ef6
commit
58cade22d3
2 changed files with 21 additions and 0 deletions
19
gestioncof/migrations/0003_event_image.py
Normal file
19
gestioncof/migrations/0003_event_image.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 = [
|
||||
('gestioncof', '0002_enable_unprocessed_demandes'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='image',
|
||||
field=models.ImageField(upload_to=b'imgs/events/', null=True, verbose_name=b'Image', blank=True),
|
||||
),
|
||||
]
|
|
@ -105,6 +105,8 @@ class Event(models.Model):
|
|||
start_date = models.DateField("Date de début", blank=True, null=True)
|
||||
end_date = models.DateField("Date de fin", blank=True, null=True)
|
||||
description = models.TextField("Description", blank=True)
|
||||
image = models.ImageField("Image", blank=True, null=True,
|
||||
upload_to="imgs/events/")
|
||||
registration_open = models.BooleanField("Inscriptions ouvertes",
|
||||
default=True)
|
||||
old = models.BooleanField("Archiver (événement fini)", default=False)
|
||||
|
|
Loading…
Reference in a new issue