editor: edit slugs and redirecting slugs
This commit is contained in:
parent
04dc3ec589
commit
f6cb959041
4 changed files with 64 additions and 5 deletions
24
src/c3nav/mapdata/migrations/0005_auto_20170527_1556.py
Normal file
24
src/c3nav/mapdata/migrations/0005_auto_20170527_1556.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2017-05-27 15:56
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mapdata', '0004_space_level_category_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='locationslug',
|
||||
options={'verbose_name': 'Location with Slug', 'verbose_name_plural': 'Lucation with Slug'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='locationslug',
|
||||
name='slug',
|
||||
field=models.SlugField(null=True, unique=True, verbose_name='slug'),
|
||||
),
|
||||
]
|
|
@ -18,7 +18,7 @@ class LocationSlug(SerializableMixin, models.Model):
|
|||
'LocationGroup': 'g'
|
||||
}
|
||||
LOCATION_TYPE_BY_CODE = {code: model_name for model_name, code in LOCATION_TYPE_CODES.items()}
|
||||
slug = models.SlugField(_('name'), unique=True, null=True, max_length=50)
|
||||
slug = models.SlugField(_('slug'), unique=True, null=True, max_length=50)
|
||||
|
||||
def get_child(self):
|
||||
# todo: cache this
|
||||
|
@ -38,8 +38,8 @@ class LocationSlug(SerializableMixin, models.Model):
|
|||
return result
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Slug for Location')
|
||||
verbose_name_plural = _('Slugs für Locations')
|
||||
verbose_name = _('Location with Slug')
|
||||
verbose_name_plural = _('Lucation with Slug')
|
||||
default_related_name = 'locationslugs'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue