De-slugify

This commit is contained in:
Matthew Ryan Dillon 2016-06-15 15:52:18 -07:00
parent 65bc5c16d4
commit 19d97cc79c
16 changed files with 0 additions and 70 deletions

View file

@ -1,5 +1,4 @@
from django.db import migrations, models
import autoslug.fields
class Migration(migrations.Migration):
@ -16,7 +15,6 @@ class Migration(migrations.Migration):
('municipal_location_type', models.CharField(blank=True, max_length=50)),
('description', models.CharField(blank=True, max_length=255)),
('sort_order', models.IntegerField(blank=True, null=True)),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
],
options={
'ordering': ['sort_order'],
@ -29,7 +27,6 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=100)),
('code', models.CharField(blank=True, max_length=10)),
('sort_order', models.IntegerField(blank=True, null=True)),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
],
options={
'ordering': ['sort_order'],
@ -43,7 +40,6 @@ class Migration(migrations.Migration):
('code', models.CharField(blank=True, max_length=10)),
('description', models.CharField(blank=True, max_length=255)),
('sort_order', models.IntegerField(blank=True, null=True)),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
('region', models.ForeignKey(to='locations.Region', null=True, blank=True)),
],
options={
@ -78,7 +74,6 @@ class Migration(migrations.Migration):
('collecting_location', models.BooleanField(default=False)),
('description', models.CharField(blank=True, max_length=255)),
('sort_order', models.IntegerField(blank=True, null=True)),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
('municipal_location', models.ForeignKey(to='locations.MunicipalLocation', null=True, blank=True)),
('site', models.ForeignKey(to='locations.Site', null=True, blank=True)),
],

View file

@ -1,13 +1,10 @@
from django.db import models
from autoslug import AutoSlugField
class Region(models.Model):
name = models.CharField(max_length=100)
code = models.CharField(max_length=10, blank=True)
sort_order = models.IntegerField(blank=True, null=True)
slug = AutoSlugField(populate_from='name')
def __str__(self):
return self.name
@ -23,7 +20,6 @@ class Site(models.Model):
code = models.CharField(max_length=10, blank=True)
description = models.CharField(max_length=255, blank=True)
sort_order = models.IntegerField(blank=True, null=True)
slug = AutoSlugField(populate_from='name')
def __str__(self):
return self.name
@ -38,7 +34,6 @@ class MunicipalLocation(models.Model):
municipal_location_type = models.CharField(max_length=50, blank=True)
description = models.CharField(max_length=255, blank=True)
sort_order = models.IntegerField(blank=True, null=True)
slug = AutoSlugField(populate_from='name')
def __str__(self):
return self.name
@ -58,7 +53,6 @@ class StudyLocation(models.Model):
collecting_location = models.BooleanField(default=False)
description = models.CharField(max_length=255, blank=True)
sort_order = models.IntegerField(blank=True, null=True)
slug = AutoSlugField(populate_from='name')
def __str__(self):
return self.code