Skip to content

Commit

Permalink
✨ [#2173] Add default leaflet map background fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmolen committed Dec 2, 2024
1 parent 25aa02f commit 68a3f88
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
13 changes: 10 additions & 3 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,18 @@ After configuring the application groups in the admin through point-and-click, y
call this script to dump the configuration into a fixture which will be loaded on
all other installations.

``bin/generate_default_groups_fixtures.sh``
-------------------------------------------
``bin/generate_default_groups_fixture.sh``
------------------------------------------

After configuring the user groups with the appropriate permissions in the admin,
you can this script to dump the configuration into a fixture which will be loaded on
you call this script to dump the configuration into a fixture which will be loaded on
all other installations.

``bin/generate_default_leaflet_map_backgrounds_fixture.sh``
-----------------------------------------------------------

After configuring the leaflet map backgrounds in the admin,
you call this script to dump the configuration into a fixture which will be loaded on
all other installations.

``bin/generate_oas.sh``
Expand Down
11 changes: 11 additions & 0 deletions bin/generate_default_leaflet_map_backgrounds_fixture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
#
# Dump the current (local database) config LeafletMapBackground to a JSON fixture.
# This overwrites the existing one.
#
# You can load this fixture with:
# $ src/manage.py loaddata default_leaflet_map_backgrounds
#
# Run this script from the root of the repository

src/manage.py dumpdata --indent=4 --natural-foreign --natural-primary config.LeafletMapBackground > src/openforms/fixtures/default_leaflet_map_backgrounds.json
20 changes: 20 additions & 0 deletions src/openforms/fixtures/default_leaflet_map_backgrounds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"model": "config.leafletmapbackground",
"pk": 1,
"fields": {
"identifier": "brt",
"url": "https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/standaard/EPSG:28992/{z}/{x}/{y}.png",
"label": "BRT"
}
},
{
"model": "config.leafletmapbackground",
"pk": 2,
"fields": {
"identifier": "luchtfoto",
"url": "https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_orthoHR/EPSG:28992/{z}/{x}/{y}.png",
"label": "Luchtfoto"
}
}
]

0 comments on commit 68a3f88

Please sign in to comment.