File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ repos:
1616 language : system
1717 always_run : true
1818 - repo : https://github.com/asottile/pyupgrade
19- rev : v2.31.1
19+ rev : v2.32.0
2020 hooks :
2121 - id : pyupgrade
2222 args : [--py38-plus]
2323 - repo : https://github.com/adamchainz/django-upgrade
24- rev : 1.4 .0
24+ rev : 1.6 .0
2525 hooks :
2626 - id : django-upgrade
2727 args : [--target-version, "3.2"]
@@ -46,13 +46,13 @@ repos:
4646 args : [--list-different, --no-semi]
4747 exclude : " ^conf/|.*\\ .html$"
4848 - repo : https://github.com/pre-commit/mirrors-eslint
49- rev : v8.12 .0
49+ rev : v8.14 .0
5050 hooks :
5151 - id : eslint
5252 args : [--fix]
5353 verbose : true
5454 additional_dependencies :
55- - eslint@8.12 .0
55+ - eslint@8.14 .0
5656 - eslint-config-prettier@8.5.0
5757 - " @babel/core"
5858 - " @babel/eslint-parser"
Original file line number Diff line number Diff line change 1717release = subprocess .check_output (
1818 "git fetch --tags; git describe" ,
1919 shell = True ,
20- universal_newlines = True ,
20+ text = True ,
2121).strip ()
2222language = "en"
2323
Original file line number Diff line number Diff line change 1+ .. _ref-templatetags :
2+
3+ Template tags (``feincms3.templatetags.feincms3 ``)
4+ ==================================================
5+
6+ .. automodule :: feincms3.templatetags.feincms3
7+ :members:
Original file line number Diff line number Diff line change @@ -160,6 +160,14 @@ def translations(iterable):
160160
161161@register .simple_tag
162162def maybe_target_blank (href , * , attributes = 'target="_blank" rel="noopener"' ):
163+ """
164+ Return the value of ``attributes`` if the first argument isn't a first party link
165+ (as determined by :func:`~feincms3.utils.is_first_party_link`)
166+
167+ Usage::
168+
169+ <a href="{{ url }}" {% maybe_target_blank url %}>...</a>
170+ """
163171 if is_first_party_link (href ):
164172 return ""
165173 return mark_safe (attributes )
You can’t perform that action at this time.
0 commit comments