turn Source.name into a CharField to allow periods
This commit is contained in:
parent
3756e01552
commit
85698dc13b
2 changed files with 21 additions and 1 deletions
20
src/c3nav/mapdata/migrations/0051_auto_20171125_1241.py
Normal file
20
src/c3nav/mapdata/migrations/0051_auto_20171125_1241.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.6 on 2017-11-25 12:41
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mapdata', '0050_remove_geometry_bounds'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='source',
|
||||
name='name',
|
||||
field=models.CharField(max_length=50, unique=True, verbose_name='Name'),
|
||||
),
|
||||
]
|
|
@ -12,7 +12,7 @@ class Source(BoundsMixin, AccessRestrictionMixin, models.Model):
|
|||
"""
|
||||
A map source, images of levels that can be useful as backgrounds for the map editor
|
||||
"""
|
||||
name = models.SlugField(_('Name'), unique=True, max_length=50)
|
||||
name = models.CharField(_('Name'), unique=True, max_length=50) # a slugfield would forbid periods
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Source')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue