Skip to content

Commit

Permalink
Merge branch 'dependabot/npm_and_yarn/percy/cli-1.28.1' of https://gi…
Browse files Browse the repository at this point in the history
…thub.com/mozilla/foundation.mozilla.org into dependabot/npm_and_yarn/percy/cli-1.28.1
  • Loading branch information
mmmavis committed Mar 14, 2024
2 parents 4d8dc1d + 116009e commit 0855354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions network-api/networkapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ class DatabasesDict(TypedDict):
"django.db.backends": {"handlers": ["debug-error"], "level": "ERROR"},
"django.utils.autoreload": {"handlers": ["debug-error"], "level": "ERROR"},
"networkapi": {
"handlers": ["debug"],
"level": "DEBUG",
"handlers": ["info"],
"level": "INFO",
},
},
}
Expand Down
10 changes: 0 additions & 10 deletions network-api/networkapi/wagtailpages/templatetags/mini_site_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse

from django import template
Expand All @@ -10,8 +9,6 @@

register = template.Library()

logger = logging.getLogger(__name__)


# Instantiate a mini-site sidebar menu based on the current page's relation to other pages
@register.inclusion_tag("wagtailpages/tags/mini_site_sidebar.html", takes_context=True)
Expand All @@ -30,19 +27,12 @@ def _generate_thank_you_url(url):
Generate a thank you page URL by grabbing the current url and appending thank_you=true
"""

logger.debug(f'Generating "thank you URL" for {url}')

parsed_url = urlparse(url)
logger.debug(f"parsed_url: {parsed_url}")
query_params = parse_qsl(parsed_url.query)
logger.debug(f"query_params: {query_params}")
query_params.append(("thank_you", "true"))
query_string = urlencode(query_params)
logger.debug(f"query_string: {query_string}")
thank_you_url = urlunparse(parsed_url._replace(query=query_string))

logger.debug(f'Generated "thank you URL": {thank_you_url}')

return thank_you_url


Expand Down

0 comments on commit 0855354

Please sign in to comment.