mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Moved club field + migrations
This commit is contained in:
43
com/migrations/0004_auto_20171023_0929.py
Normal file
43
com/migrations/0004_auto_20171023_0929.py
Normal file
@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('club', '0010_auto_20170912_2028'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('com', '0003_auto_20170115_2300'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Poster',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('name', models.CharField(verbose_name='name', max_length=128, default='')),
|
||||
('file', models.ImageField(verbose_name='file', upload_to='com/posters')),
|
||||
('date_begin', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('date_end', models.DateTimeField(blank=True, null=True)),
|
||||
('is_moderated', models.BooleanField(verbose_name='is moderated', default=False)),
|
||||
('club', models.ForeignKey(verbose_name='club', related_name='posters', to='club.Club')),
|
||||
('moderator', models.ForeignKey(verbose_name='moderator', blank=True, null=True, related_name='moderated_posters', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Screen',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)),
|
||||
('name', models.CharField(verbose_name='name', max_length=128)),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='poster',
|
||||
name='screens',
|
||||
field=models.ManyToManyField(related_name='posters', to='com.Screen'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user