summaryrefslogtreecommitdiff
path: root/pgweb/news/migrations/0001_initial.py
blob: 43635c0cdb1ab074b657fd1134a95dc7e3a14636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import datetime

from pgweb.core.text import ORGANISATION_HINT_TEXT


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='NewsArticle',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('approved', models.BooleanField(default=False)),
                ('date', models.DateField(default=datetime.date.today)),
                ('title', models.CharField(max_length=200)),
                ('content', models.TextField()),
                ('org', models.ForeignKey(verbose_name='Organisation', to='core.Organisation', help_text=ORGANISATION_HINT_TEXT, on_delete=models.CASCADE)),
            ],
            options={
                'ordering': ('-date',),
            },
        ),
    ]