Skip to content
Snippets Groups Projects
0004_funding.py 1.28 KiB
Newer Older
  • Learn to ignore specific revisions
  • # -*- coding: utf-8 -*-
    # Generated by Django 1.11.8 on 2018-01-10 16:25
    from __future__ import unicode_literals
    
    from django.db import migrations, models
    import django.db.models.deletion
    import modelcluster.fields
    
    
    class Migration(migrations.Migration):
    
        dependencies = [
            ('wagtailcore', '0040_page_draft_title'),
            ('people', '0003_update_contact_information'),
        ]
    
        operations = [
            migrations.CreateModel(
                name='Funding',
                fields=[
                    ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                    ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                    ('value', models.PositiveIntegerField()),
                    ('year', models.PositiveIntegerField()),
                    ('duration', models.PositiveIntegerField(help_text='In months')),
                    ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='funding', to='people.PersonPage')),
    
                    ('source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='wagtailcore.Page')),
    
                ],
                options={
                    'ordering': ['sort_order'],
                    'abstract': False,
                },
            ),
        ]