allow waytypes to be excluded by default
This commit is contained in:
parent
d5c7d50f78
commit
6428a39a04
5 changed files with 34 additions and 10 deletions
|
@ -0,0 +1,24 @@
|
|||
# Generated by Django 5.0.8 on 2024-12-15 18:23
|
||||
|
||||
import c3nav.mapdata.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mapdata', '0115_dataoverlay_access_restriction'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='waytype',
|
||||
name='avoid_by_default',
|
||||
field=models.BooleanField(default=False, verbose_name='avoid by default'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='waytype',
|
||||
name='description',
|
||||
field=c3nav.mapdata.fields.I18nField(fallback_any=True, verbose_name='description (downwards or general)'),
|
||||
),
|
||||
]
|
|
@ -41,11 +41,12 @@ class WayType(SerializableMixin, models.Model):
|
|||
up_separate = models.BooleanField(_('upwards separately'), default=True)
|
||||
walk = models.BooleanField(_('walking'), default=False)
|
||||
color = models.CharField(max_length=32, verbose_name=_('edge color'))
|
||||
avoid_by_default = models.BooleanField(_('avoid by default'), default=False)
|
||||
icon_name = models.CharField(_('icon name'), max_length=32, null=True, blank=True)
|
||||
extra_seconds = models.PositiveSmallIntegerField(_('extra seconds per edge'), default=0)
|
||||
speed = models.DecimalField(_('speed (m/s)'), max_digits=3, decimal_places=1, default=1,
|
||||
validators=[MinValueValidator(Decimal('0.1'))])
|
||||
description = I18nField(_('description'), fallback_any=True)
|
||||
description = I18nField(_('description (downwards or general)'), fallback_any=True)
|
||||
speed_up = models.DecimalField(_('speed upwards (m/s)'), max_digits=3, decimal_places=1, default=1,
|
||||
validators=[MinValueValidator(Decimal('0.1'))])
|
||||
description_up = I18nField(_('description upwards'), fallback_any=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue