Skip to content

Commit

Permalink
field show_labels added to SpatialCoverage, fix #95
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed May 25, 2022
1 parent 30ef2a3 commit 7c48b98
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions archiv/api_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Meta:
auto_bbox = True
fields = (
'id',
'show_labels',
'key_word',
'fuzzyness',
'stelle',
Expand Down
1 change: 1 addition & 0 deletions archiv/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class Meta:
model = SpatialCoverage
fields = [
'id',
'show_labels',
'key_word',
'stelle',
]
Expand Down
1 change: 1 addition & 0 deletions archiv/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def __init__(self, *args, **kwargs):
Fieldset(
'Basic search options',
'id',
'show_labels',
'key_word',
'stelle__use_case',
'stelle__ort',
Expand Down
18 changes: 18 additions & 0 deletions archiv/migrations/0036_spatialcoverage_show_labels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.9 on 2022-05-25 05:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('archiv', '0035_auto_20220328_1100'),
]

operations = [
migrations.AddField(
model_name='spatialcoverage',
name='show_labels',
field=models.BooleanField(default=True, help_text='True if the label of the Spatial Coverage should be visible in the front end', verbose_name='Show Labels'),
),
]
5 changes: 5 additions & 0 deletions archiv/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,11 @@ class SpatialCoverage(models.Model):
).set_extra(
is_public=True,
)
show_labels = models.BooleanField(
default=True,
verbose_name="Show Labels",
help_text="True if the label of the Spatial Coverage should be visible in the front end"
)

class Meta:

Expand Down

0 comments on commit 7c48b98

Please sign in to comment.