0001_initial.py 1.58 KB
Newer Older
1
2
3
4
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
5
import autoslug.fields
6
7
8
9
10
11


class Migration(migrations.Migration):

    dependencies = [
        ('representatives_votes', '0012_document'),
12
        ('representatives_positions', '0003_remove_position_tags'),
13
14
15
16
17
18
19
20
    ]

    operations = [
        migrations.CreateModel(
            name='Theme',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(unique=True, max_length=255)),
21
                ('slug', autoslug.fields.AutoSlugField(populate_from=b'name', editable=False)),
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
                ('description', models.TextField()),
                ('dossiers', models.ManyToManyField(related_name='themes', to='representatives_votes.Dossier')),
                ('positions', models.ManyToManyField(related_name='themes', to='representatives_positions.Position')),
                ('proposals', models.ManyToManyField(related_name='themes', to='representatives_votes.Proposal')),
            ],
        ),
        migrations.CreateModel(
            name='ThemeLink',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('title', models.CharField(max_length=511)),
                ('datetime', models.DateField()),
                ('link', models.URLField(max_length=500)),
                ('theme', models.ForeignKey(related_name='links', to='memopol_themes.Theme')),
            ],
        ),
    ]