There's one line break missing at line
https://github.com/django/django/blob/master/docs/topics/auth/customizing.txt#L1172,
so that the example code is PEP8 compliant.
I would be happy to submit my very first PR if that's ok.
--
Ticket URL: <https://code.djangoproject.com/ticket/30620>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 2.2 => master
* stage: Unreviewed => Accepted
Comment:
Thanks for this report. Normally we don't restrict all PEP8 rules in
examples, e.g. in most of cases we don't put 2 blank lines before class
definition. In this case we have a full example that can be copy & paste,
so we can make it PEP8 compliant, for that please fix also
`add_fieldsets`:
{{{
diff --git a/docs/topics/auth/customizing.txt
b/docs/topics/auth/customizing.txt
index daec10c28e..7d287051d8 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -1162,13 +1162,14 @@ code would be required in the app's ``admin.py``
file::
add_fieldsets = (
(None, {
'classes': ('wide',),
- 'fields': ('email', 'date_of_birth', 'password1',
'password2')}
- ),
+ 'fields': ('email', 'date_of_birth', 'password1',
'password2'),
+ }),
)
search_fields = ('email',)
ordering = ('email',)
filter_horizontal = ()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30620#comment:1>
* status: new => assigned
* owner: nobody => Nuno
--
Ticket URL: <https://code.djangoproject.com/ticket/30620#comment:2>
* has_patch: 0 => 1
Comment:
Submitted PR in Github.
Link: [https://github.com/django/django/pull/11544 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/30620#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"34a88b21dae71a26a9b136b599e5cbcf817eae16" 34a88b21]:
{{{
#!CommitTicketReference repository=""
revision="34a88b21dae71a26a9b136b599e5cbcf817eae16"
Fixed #30620 -- Made an example of admin-compliant custom user app pep8
compliant.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30620#comment:4>