-
Notifications
You must be signed in to change notification settings - Fork 3
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 #18 from rl-institut/release/v1.7.0
Release v1.7.0
- Loading branch information
Showing
6 changed files
with
39 additions
and
5 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
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,3 +1,3 @@ | ||
"""Map Engine init, holds version""" | ||
|
||
__version__ = "1.6.1" | ||
__version__ = "1.7.0" |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Mapengine middleware""" | ||
|
||
from django.http import HttpResponse | ||
|
||
|
||
class MapEngineMiddleware: # pylint: disable=R0903 | ||
"""Catches non-existing MVTs and returns empty HTTPResponses instead""" | ||
|
||
def __init__(self, get_response): | ||
self.get_response = get_response | ||
|
||
def __call__(self, request): | ||
""" | ||
Checks if request is for a distilled MVT and if response is okay. | ||
Otherwise, it returns empty 204 response. | ||
""" | ||
response = self.get_response(request) | ||
if request.path.startswith("/static/mvts") and response.status_code == 404: | ||
return HttpResponse(status=204) | ||
return response |
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,6 @@ | ||
[tool.poetry] | ||
name = "django-mapengine" | ||
version = "1.6.1" | ||
version = "1.7.0" | ||
description = "Map engine for maplibre in django" | ||
authors = ["Hendrik Huyskens <[email protected]>"] | ||
readme = "README.md" | ||
|