Skip to content

Commit

Permalink
Black spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Sep 3, 2021
1 parent 5a102f2 commit 9638970
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
WAGTAIL_SITE_NAME = "NHSX"
WAGTAILEMBEDS_FINDERS = [
{
'class': 'helpers.finders.OSMFinder',
"class": "helpers.finders.OSMFinder",
# Any other options will be passed as kwargs to the __init__ method
}
]
Expand Down
16 changes: 8 additions & 8 deletions app/helpers/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class OSMFinder(EmbedFinder):
"""OpenStreetMap.org embed"""

def __init__(self, **options):
pass

Expand All @@ -12,10 +13,9 @@ def accept(self, url):
This should not have any side effects (no requests to external servers)
"""

if not url.startswith('https://www.openstreetmap.org/export/embed.html'):
if not url.startswith("https://www.openstreetmap.org/export/embed.html"):
return False
return True


def find_embed(self, url, max_width=None):
"""
Expand All @@ -27,11 +27,11 @@ def find_embed(self, url, max_width=None):

return {
# 'title': "",
'author_name': "OpenStreetMap contributors",
'provider_name': "OpenStreetMap.org",
'type': "rich",
"author_name": "OpenStreetMap contributors",
"provider_name": "OpenStreetMap.org",
"type": "rich",
# 'thumbnail_url': "URL to thumbnail image",
'width': 425,
'height': 350,
'html': f"""<div class='osm-embed'><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="{url}" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/#map=14/54.7747/-1.5886">View Larger Map</a></small></div>""",
"width": 425,
"height": 350,
"html": f"""<div class='osm-embed'><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="{url}" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/#map=14/54.7747/-1.5886">View Larger Map</a></small></div>""",
}

0 comments on commit 9638970

Please sign in to comment.