Skip to content

Commit

Permalink
✨ [#2173] Add default map tile layer fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmolen committed Dec 17, 2024
1 parent ecaa45f commit d7eb7bd
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 @@ -432,11 +432,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_map_tile_layers_fixture.sh``
-----------------------------------------------------------

After configuring the map tile layers 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_map_tile_layers_fixture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
#
# Dump the current (local database) config MapTileLayer to a JSON fixture.
# This overwrites the existing one.
#
# You can load this fixture with:
# $ src/manage.py loaddata default_map_tile_layers
#
# Run this script from the root of the repository

src/manage.py dumpdata --indent=4 --natural-foreign --natural-primary config.MapTileLayer > src/openforms/fixtures/default_map_tile_layers.json
20 changes: 20 additions & 0 deletions src/openforms/fixtures/default_map_tile_layers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"model": "config.maptilelayer",
"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.maptilelayer",
"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 d7eb7bd

Please sign in to comment.