Changes between Initial Version and Version 1 of Ticket #30776, comment 7


Ignore:
Timestamp:
Sep 18, 2019, 4:33:24 AM (5 years ago)
Author:
Carlton Gibson

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30776, comment 7

    initial v1  
    44
    55Nor, though can we add the user name field in the form `__init__()`, in order to avoid this kind of logic, and duplicating `CharField.__init__()`:
     6
     7This kind of thing, in `AuthenticationForm.__init__()`:
     8
     9{{{
     10        self.fields['username'] = UsernameField(
     11            max_length=username_max_length,
     12            widget=forms.TextInput(attrs={'autofocus': True, 'max_length': username_max_length})
     13        )
     14}}}
     15
    616
    717* Other logic, e.g. correct label setting assumes the current setup, and...
Back to Top