-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4982 from open-formulieren/issue/4969-map-tile-la…
…yers-fixture Load map tile layers fixture automatically
- Loading branch information
Showing
4 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
from io import StringIO | ||
|
||
from django.apps import AppConfig | ||
from django.core.management import call_command | ||
from django.db.models.signals import post_migrate | ||
from django.dispatch import receiver | ||
|
||
|
||
class OpenFormsConfigConfig(AppConfig): | ||
name = "openforms.config" | ||
verbose_name = "Configuration" | ||
|
||
|
||
@receiver(post_migrate, dispatch_uid="load_default_map_tile_layers") | ||
def update_map_tile_layers(sender, **kwargs): | ||
call_command("loaddata", "default_map_tile_layers", verbosity=0, stdout=StringIO()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters