add single, allow_* and priority to LocationGroupCategory
This commit is contained in:
parent
18b64675b6
commit
2d3d67403c
2 changed files with 57 additions and 0 deletions
51
src/c3nav/mapdata/migrations/0020_auto_20170710_1848.py
Normal file
51
src/c3nav/mapdata/migrations/0020_auto_20170710_1848.py
Normal file
|
@ -0,0 +1,51 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-07-10 16:48
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mapdata', '0019_location_group_category'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='allow_areas',
|
||||
field=models.BooleanField(db_index=True, default=True, verbose_name='allow areas'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='allow_levels',
|
||||
field=models.BooleanField(db_index=True, default=True, verbose_name='allow levels'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='allow_pois',
|
||||
field=models.BooleanField(db_index=True, default=True, verbose_name='allow pois'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='allow_spaces',
|
||||
field=models.BooleanField(db_index=True, default=True, verbose_name='allow spaces'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='priority',
|
||||
field=models.IntegerField(db_index=True, default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='locationgroupcategory',
|
||||
name='single',
|
||||
field=models.BooleanField(default=False, verbose_name='single selection'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='locationgroup',
|
||||
name='category',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='groups', to='mapdata.LocationGroupCategory', verbose_name='Category'),
|
||||
),
|
||||
]
|
|
@ -153,6 +153,12 @@ class SpecificLocation(Location, models.Model):
|
|||
|
||||
class LocationGroupCategory(TitledMixin, models.Model):
|
||||
name = models.SlugField(_('Name'), unique=True, max_length=50)
|
||||
single = models.BooleanField(_('single selection'), default=False)
|
||||
allow_levels = models.BooleanField(_('allow levels'), db_index=True, default=True)
|
||||
allow_spaces = models.BooleanField(_('allow spaces'), db_index=True, default=True)
|
||||
allow_areas = models.BooleanField(_('allow areas'), db_index=True, default=True)
|
||||
allow_pois = models.BooleanField(_('allow pois'), db_index=True, default=True)
|
||||
priority = models.IntegerField(default=0, db_index=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Location Group Category')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue