This commit is contained in:
Matthew Dillon 2016-01-30 17:05:59 -07:00
parent e397e96dab
commit 3be40fe7da
8 changed files with 76 additions and 14 deletions

View file

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import autoslug.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Species',
fields=[
('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)),
('common_name', models.CharField(max_length=100)),
('genus', models.CharField(max_length=50, blank=True)),
('species', models.CharField(max_length=50, blank=True)),
('parasite', models.BooleanField(default=False)),
('sort_order', models.IntegerField(blank=True, null=True)),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='common_name')),
],
options={
'ordering': ['sort_order'],
'verbose_name_plural': 'species',
},
),
migrations.AlterUniqueTogether(
name='species',
unique_together=set([('common_name', 'species')]),
),
]

View file