Re: [Django] #34446: Coding style docs should contain incorrect example for Model style.

11 views
Skip to first unread message

Django

unread,
Mar 30, 2023, 4:08:02 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------+------------------------------------
Reporter: JiriKr | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

TBH, I think this example is no longer needed as we have `black` CI
builds. I'd remove it:

{{{#!diff
diff --git a/docs/internals/contributing/writing-code/coding-style.txt
b/docs/internals/contributing/writing-code/coding-style.txt
index 5b64e94b24..812be79c91 100644
--- a/docs/internals/contributing/writing-code/coding-style.txt
+++ b/docs/internals/contributing/writing-code/coding-style.txt
@@ -279,15 +279,6 @@ Model style

Don't do this::

- class Person(models.Model):
- first_name = models.CharField(max_length=20)
- last_name = models.CharField(max_length=40)
-
- class Meta:
- verbose_name_plural = "people"
-
- Don't do this, either::
-
class Person(models.Model):
class Meta:
verbose_name_plural = "people"

}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 30, 2023, 4:09:18 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------+------------------------------------
Reporter: JiriKr | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Paolo Melchiorre):

I agree with Mariusz

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:3>

Django

unread,
Mar 30, 2023, 5:06:00 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------------+-------------------------------------

Reporter: JiriKr | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by JiriKr):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

Replying to [comment:1 Mariusz Felisiak]:
> JiriKr, Would you like to prepare a patch?

Yes, I would like to. It's my first contribution to Django (hope it will
be correct).

Thank you for guidance, I prepared
[https://github.com/django/django/pull/16706 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:4>

Django

unread,
Mar 30, 2023, 5:07:44 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------+------------------------------------

Reporter: JiriKr | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by JiriKr):

* stage: Ready for checkin => Accepted


Comment:

Sorry, not sure if I can change Triage Stage.

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:5>

Django

unread,
Mar 30, 2023, 5:10:35 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------------+-------------------------------------

Reporter: JiriKr | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


Comment:

> Sorry, not sure if I can change Triage Stage.

You shouldn't change stage for your own tickets/PRs ;), but I can. Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:6>

Django

unread,
Mar 30, 2023, 5:41:27 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------------+-------------------------------------
Reporter: JiriKr | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"cfe563ffaf01d22343717176d96bfca0d05f60fb" cfe563ff]:
{{{
#!CommitTicketReference repository=""
revision="cfe563ffaf01d22343717176d96bfca0d05f60fb"
Fixed #34446 -- Removed unneeded and incorrect example in coding style
docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:7>

Django

unread,
Mar 30, 2023, 5:41:57 AM3/30/23
to django-...@googlegroups.com
#34446: Coding style docs should contain incorrect example for Model style.
-------------------------------------+-------------------------------------
Reporter: JiriKr | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"634acb5180600e6701ca73c271690d5666b796dd" 634acb5]:
{{{
#!CommitTicketReference repository=""
revision="634acb5180600e6701ca73c271690d5666b796dd"
[4.2.x] Fixed #34446 -- Removed unneeded and incorrect example in coding
style docs.

Backport of cfe563ffaf01d22343717176d96bfca0d05f60fb from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34446#comment:8>

Reply all
Reply to author
Forward
0 new messages