styling issue with password_validators_help_text_html in the admin #26097

115 views
Skip to first unread message

Sasha Gaevsky

unread,
Feb 14, 2016, 7:04:46 AM2/14/16
to Django developers (Contributions to Django itself)
Hi.

As noted in the ticket, there's a styling issue in the admin when password validators enabled, they are not properly aligned:

















The root cause of this because validators help text is a list <ul> and it's placed inside of paragraph tag <p> which is not allowed:

<p class="help">{{ form.password2.help_text|safe }}</p>

Both of  Chrome and FF removes list out of <p> tag. Thus, I my initial solution was just to replace <p> tag with span.
However, how fairly mentioned Tim, this would be quite unsuitable for those, who already customized admin templates.

Another idea was to output password validation help text not in in <ul> list.
















Sasha Gaevsky

unread,
Feb 23, 2016, 12:55:53 PM2/23/16
to Django developers (Contributions to Django itself)
Hi.

Suggestions of another solutions are appreciated.

Thanks!

воскресенье, 14 февраля 2016 г., 14:04:46 UTC+2 пользователь Sasha Gaevsky написал:
Reply all
Reply to author
Forward
0 new messages