turn Source.name into a CharField to allow periods

This commit is contained in:
Laura Klünder 2017-11-25 13:42:05 +01:00
parent 3756e01552
commit 85698dc13b
2 changed files with 21 additions and 1 deletions

View 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'),
),
]

View file

@ -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')