From c4474f3a9f5a373062b7393c7c30c6b4823a41d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 27 May 2017 18:35:57 +0200 Subject: [PATCH] remove section name --- .../migrations/0006_remove_section_name.py | 19 +++++++++++++++++++ src/c3nav/mapdata/models/section.py | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/c3nav/mapdata/migrations/0006_remove_section_name.py diff --git a/src/c3nav/mapdata/migrations/0006_remove_section_name.py b/src/c3nav/mapdata/migrations/0006_remove_section_name.py new file mode 100644 index 00000000..34bbc69e --- /dev/null +++ b/src/c3nav/mapdata/migrations/0006_remove_section_name.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-05-27 16:35 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('mapdata', '0005_auto_20170527_1556'), + ] + + operations = [ + migrations.RemoveField( + model_name='section', + name='name', + ), + ] diff --git a/src/c3nav/mapdata/models/section.py b/src/c3nav/mapdata/models/section.py index f1a24f92..96d6af90 100644 --- a/src/c3nav/mapdata/models/section.py +++ b/src/c3nav/mapdata/models/section.py @@ -13,7 +13,6 @@ class Section(SpecificLocation, EditorFormMixin, models.Model): """ A map section like a level """ - name = models.SlugField(_('section name'), unique=True, max_length=50) altitude = models.DecimalField(_('section altitude'), null=False, unique=True, max_digits=6, decimal_places=2) class Meta: @@ -33,7 +32,6 @@ class Section(SpecificLocation, EditorFormMixin, models.Model): def _serialize(self, section=True, **kwargs): result = super()._serialize(**kwargs) - result['name'] = self.name result['altitude'] = float(str(self.altitude)) return result