diff --git a/bplan/migrations/0006_add_ordering_to_bplan.py b/bplan/migrations/0006_add_ordering_to_bplan.py new file mode 100644 index 00000000..bc53dc36 --- /dev/null +++ b/bplan/migrations/0006_add_ordering_to_bplan.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.20 on 2021-06-07 11:52 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('bplan', '0005_remove_old_fields_from_bplan_model'), + ] + + operations = [ + migrations.AlterModelOptions( + name='bplan', + options={'ordering': ['id']}, + ), + ] diff --git a/bplan/models.py b/bplan/models.py index 344da31d..8151444c 100644 --- a/bplan/models.py +++ b/bplan/models.py @@ -86,3 +86,4 @@ def __str__(self): class Meta: index_together = [["bbg_anfang", "bbg_ende"], ["aul_anfang", "aul_ende"]] + ordering = ['id'] diff --git a/bplan/serializers.py b/bplan/serializers.py index fa73ff67..3c23a168 100644 --- a/bplan/serializers.py +++ b/bplan/serializers.py @@ -155,5 +155,6 @@ class BPlanSerializer(SimpleBPlanSerializer, GeoFeatureModelSerializer): class Meta: model = BPlan + fields = '__all__' id_field = False geo_field = 'multipolygon' diff --git a/django_zbp/settings/base.py b/django_zbp/settings/base.py index b1dacab6..e8463ee5 100644 --- a/django_zbp/settings/base.py +++ b/django_zbp/settings/base.py @@ -37,6 +37,7 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.gis', + 'django_filters', 'rest_framework', 'rest_framework_gis', 'bplan',