Changes between Initial Version and Version 7 of Ticket #27515


Ignore:
Timestamp:
Nov 20, 2016, 6:34:58 PM (8 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27515

    • Property Owner changed from nobody to Ramin Farajpour Cami
    • Property Summary admin login action is maxlength 254 rether thet 150 charactersMake AuthenticationForm use the username length from the user model
    • Property Component Formscontrib.auth
    • Property Triage Stage UnreviewedAccepted
  • Ticket #27515 – Description

    initial v7  
    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__()`.
Back to Top