Fixed ReadOnlyPasswordHashWidget's template for RTL languages.
This commit is contained in:
parent
974942a750
commit
fdf0f62521
|
@ -1,5 +1,5 @@
|
|||
<div{% include 'django/forms/widgets/attrs.html' %}>
|
||||
{% for entry in summary %}
|
||||
<strong>{{ entry.label }}</strong>{% if entry.value %}: {{ entry.value }}{% endif %}
|
||||
<strong>{{ entry.label }}</strong>{% if entry.value %}: <bdi>{{ entry.value }}</bdi>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -1159,14 +1159,13 @@ class ReadOnlyPasswordHashTest(SimpleTestCase):
|
|||
)
|
||||
self.assertHTMLEqual(
|
||||
widget.render("name", value, {"id": "id_password"}),
|
||||
"""
|
||||
<div id="id_password">
|
||||
<strong>algorithm</strong>: pbkdf2_sha256
|
||||
<strong>iterations</strong>: 100000
|
||||
<strong>salt</strong>: a6Pucb******
|
||||
<strong>hash</strong>: WmCkn9**************************************
|
||||
</div>
|
||||
""",
|
||||
'<div id="id_password">'
|
||||
" <strong>algorithm</strong>: <bdi>pbkdf2_sha256</bdi>"
|
||||
" <strong>iterations</strong>: <bdi>100000</bdi>"
|
||||
" <strong>salt</strong>: <bdi>a6Pucb******</bdi>"
|
||||
" <strong>hash</strong>: "
|
||||
" <bdi>WmCkn9**************************************</bdi>"
|
||||
"</div>",
|
||||
)
|
||||
|
||||
def test_readonly_field_has_changed(self):
|
||||
|
|
|
@ -1519,9 +1519,9 @@ class ChangelistTests(AuthViewsTestCase):
|
|||
# ReadOnlyPasswordHashWidget is used to render the field.
|
||||
self.assertContains(
|
||||
response,
|
||||
"<strong>algorithm</strong>: %s\n\n"
|
||||
"<strong>salt</strong>: %s********************\n\n"
|
||||
"<strong>hash</strong>: %s**************************\n\n"
|
||||
"<strong>algorithm</strong>: <bdi>%s</bdi>\n\n"
|
||||
"<strong>salt</strong>: <bdi>%s********************</bdi>\n\n"
|
||||
"<strong>hash</strong>: <bdi>%s**************************</bdi>\n\n"
|
||||
% (
|
||||
algo,
|
||||
salt[:2],
|
||||
|
|
Loading…
Reference in New Issue