1 | | Hi, |
2 | | |
3 | | http://127.0.0.1:8000/admin/ |
4 | | |
5 | | |
6 | | {{{ |
7 | | <form action="/admin/" method="post" id="login-form"> |
8 | | <input type="hidden" name="csrfmiddlewaretoken" value=""> |
9 | | <div class="form-row"> |
10 | | <label class="required" for="id_username">Username:</label> |
11 | | <input autofocus="" id="id_username" maxlength="254" name="username" type="text" required=""> |
12 | | }}} |
13 | | |
14 | | `maxlength="150"` is Right, |
15 | | |
| 1 | `AuthenticationForm` has a hardcoded `max_length=254` (#19130). It might be able to use the max length from the user model with something like: `self.fields['username'].max_length = UserModel._meta.get_field(UserModel.USERNAME_FIELD).max_length` in `AuthenticationForm.__init__()`. |