mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 17:56:11 +02:00
Merge branch 'dk/1091-dnssec' of https://github.com/cisagov/getgov into dk/1091-dnssec
This commit is contained in:
commit
afdc922b13
3 changed files with 7 additions and 2 deletions
|
@ -34,7 +34,7 @@
|
|||
>
|
||||
DNSSEC
|
||||
</a>
|
||||
{% if domain.dnssec_enabled %}
|
||||
{% if domain.dnssecdata is not None or request.path|startswith:url and request.path|endswith:'data' %}
|
||||
<ul class="usa-sidenav__sublist">
|
||||
<li class="usa-sidenav__item">
|
||||
{% url 'domain-dns-dnssec-dsdata' pk=domain.id as url %}
|
||||
|
|
|
@ -149,7 +149,7 @@ def input_with_errors(context, field=None): # noqa: C901
|
|||
# see Widget.get_context() on
|
||||
# https://docs.djangoproject.com/en/4.1/ref/forms/widgets
|
||||
widget = field.field.widget.get_context(
|
||||
field.html_name, field.value() or field.initial, field.build_widget_attrs(attrs)
|
||||
field.html_name, field.value(), field.build_widget_attrs(attrs)
|
||||
) # -> {"widget": {"name": ...}}
|
||||
|
||||
context["widget"] = widget["widget"]
|
||||
|
|
|
@ -18,6 +18,11 @@ def startswith(text, starts):
|
|||
return text.startswith(starts)
|
||||
return False
|
||||
|
||||
@register.filter("endswith")
|
||||
def endswith(text, ends):
|
||||
if isinstance(text, str):
|
||||
return text.endswith(ends)
|
||||
return False
|
||||
|
||||
@register.simple_tag
|
||||
def public_site_url(url_path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue