Remove Source from Editor
This commit is contained in:
parent
38a4ec16d0
commit
df694fddf3
2 changed files with 48 additions and 3 deletions
44
src/c3nav/mapdata/migrations/0004_auto_20161128_1536.py
Normal file
44
src/c3nav/mapdata/migrations/0004_auto_20161128_1536.py
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.2 on 2016-11-28 15:36
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mapdata', '0003_auto_20161016_1133'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='area',
|
||||||
|
options={'verbose_name': 'Area', 'verbose_name_plural': 'Areas'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='building',
|
||||||
|
options={'verbose_name': 'Building', 'verbose_name_plural': 'Buildings'},
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='area',
|
||||||
|
name='level',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='areas', to='mapdata.Level', verbose_name='level'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='area',
|
||||||
|
name='package',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='areas', to='mapdata.Package', verbose_name='map package'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='building',
|
||||||
|
name='level',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='buildings', to='mapdata.Level', verbose_name='level'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='building',
|
||||||
|
name='package',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='buildings', to='mapdata.Package', verbose_name='map package'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -1,13 +1,14 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.db.models import Model
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from c3nav.mapdata.models.base import MapItem
|
|
||||||
|
|
||||||
|
class Source(Model):
|
||||||
class Source(MapItem):
|
|
||||||
"""
|
"""
|
||||||
A map source, images of levels that can be useful as backgrounds for the map editor
|
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)
|
||||||
|
package = models.ForeignKey('mapdata.Package', on_delete=models.CASCADE, verbose_name=_('map package'))
|
||||||
bottom = models.DecimalField(_('bottom coordinate'), max_digits=6, decimal_places=2)
|
bottom = models.DecimalField(_('bottom coordinate'), max_digits=6, decimal_places=2)
|
||||||
left = models.DecimalField(_('left coordinate'), max_digits=6, decimal_places=2)
|
left = models.DecimalField(_('left coordinate'), max_digits=6, decimal_places=2)
|
||||||
top = models.DecimalField(_('top coordinate'), max_digits=6, decimal_places=2)
|
top = models.DecimalField(_('top coordinate'), max_digits=6, decimal_places=2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue