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):
|
||||
|
@ -19,7 +18,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(populate_from='name', editable=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['sort_order'],
|
||||
|
@ -32,7 +30,6 @@ class Migration(migrations.Migration):
|
|||
('name', models.CharField(max_length=200)),
|
||||
('description', models.CharField(blank=True, max_length=255)),
|
||||
('sort_order', models.IntegerField(blank=True, null=True)),
|
||||
('slug', autoslug.fields.AutoSlugField(populate_from='name', editable=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['sort_order'],
|
||||
|
@ -65,7 +62,6 @@ class Migration(migrations.Migration):
|
|||
('placement', models.CharField(blank=True, max_length=25)),
|
||||
('description', models.CharField(blank=True, max_length=255)),
|
||||
('sort_order', models.IntegerField(blank=True, null=True)),
|
||||
('slug', autoslug.fields.AutoSlugField(populate_from='name', editable=False)),
|
||||
('experiment', models.ForeignKey(to='experiments.Experiment', null=True, blank=True)),
|
||||
],
|
||||
options={
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
from django.db import models
|
||||
|
||||
from autoslug import AutoSlugField
|
||||
|
||||
|
||||
class Flaw(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
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
|
||||
|
@ -22,7 +19,6 @@ class Experiment(models.Model):
|
|||
description = models.CharField(max_length=255, blank=True)
|
||||
flaw = models.ForeignKey(Flaw, blank=True, null=True, related_name='experiments')
|
||||
sort_order = models.IntegerField(blank=True, null=True)
|
||||
slug = AutoSlugField(populate_from='name')
|
||||
collections = models.ManyToManyField('collections_ccdb.Collection')
|
||||
|
||||
def __str__(self):
|
||||
|
@ -50,7 +46,6 @@ class TreatmentType(models.Model):
|
|||
placement = models.CharField(max_length=25, blank=True)
|
||||
description = models.CharField(max_length=255, blank=True)
|
||||
sort_order = models.IntegerField(blank=True, null=True)
|
||||
slug = AutoSlugField(populate_from='name')
|
||||
display_name = models.CharField(max_length=255, editable=False)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue