The location is not mandatory for an event

This commit is contained in:
Martin Pépin 2017-08-07 20:51:08 +01:00
parent b1a56b07f3
commit 10543341b7
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11b1 on 2017-08-07 19:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('gestion', '0003_association_and_events'),
]
operations = [
migrations.AlterField(
model_name='event',
name='location',
field=models.ForeignKey(
blank=True, null=True,
on_delete=django.db.models.deletion.PROTECT,
to='gestion.Location',
verbose_name='lieux'
),
),
]

View file

@ -179,6 +179,7 @@ class Event(models.Model):
title = models.CharField(_("titre"), max_length=200)
location = models.ForeignKey(
Location,
blank=True, null=True,
on_delete=models.PROTECT,
verbose_name=_("lieux"),
)