De-slugify
This commit is contained in:
parent
65bc5c16d4
commit
19d97cc79c
16 changed files with 0 additions and 70 deletions
|
@ -1,5 +1,4 @@
|
|||
from django.db import migrations, models
|
||||
import autoslug.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -17,7 +16,6 @@ class Migration(migrations.Migration):
|
|||
('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(populate_from='common_name', editable=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['sort_order'],
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
from django.db import models
|
||||
|
||||
from autoslug import AutoSlugField
|
||||
|
||||
|
||||
class Species(models.Model):
|
||||
common_name = models.CharField(max_length=100)
|
||||
|
@ -9,7 +7,6 @@ class Species(models.Model):
|
|||
species = models.CharField(max_length=50, blank=True)
|
||||
parasite = models.BooleanField(default=False)
|
||||
sort_order = models.IntegerField(blank=True, null=True)
|
||||
slug = AutoSlugField(populate_from='common_name')
|
||||
|
||||
def __str__(self):
|
||||
return self.common_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue