#32271 closed Cleanup/optimization (fixed)
Documentation consistency between display views and edit views
Reported by: | Carles Pina Estany | Owned by: | |
---|---|---|---|
Component: | Documentation | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In the "generic display views" (https://docs.djangoproject.com/en/3.1/ref/class-based-views/generic-display/#django.views.generic.detail.DetailView) the example is:
class ArticleDetailView(DetailView):
In the "Generic editing views" (https://docs.djangoproject.com/en/3.1/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView.template_name_suffix) the example is:
class AuthorCreate(CreateView):
(note that there is no View
after AuthorCreate
, like it was in the ArticleDetailView
example)
I was expecting it to be either:
class ArticleDetailView(DetailView) class AuthorCreateView(CreateView)
or:
class ArticleDetail(DetailView) class AuthorCreate(CreateView)
I'm happy to do a PR of any of the options. I'm slightly inclined for the second one to keep it short and because usually these classes are in views.py
.
Change History (12)
comment:1 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
follow-up: 5 comment:3 by , 4 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Hey Carles. I see you're midway through. 👍 Please uncheck Patch needs improvement when it's finished and you're ready for review. Thanks.
comment:4 by , 4 years ago
Easy pickings: | set |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:5 by , 4 years ago
Replying to Carlton Gibson:
Hi Carlton, is this still open or does it need work? Happy to help.
Hey Carles. I see you're midway through. 👍 Please uncheck Patch needs improvement when it's finished and you're ready for review. Thanks.
follow-up: 7 comment:6 by , 4 years ago
Hi Jack -- there was work done on the pr I've linked below, but the comments made on the PR need addressing. If you have capacity to finish this off that would be great.
comment:7 by , 4 years ago
Replying to David Smith:
Thanks, David. I've been reviewing the history and it looks like there were some comments by Mariusz regarding the previous commit. Here's what I can gather from those comments about what should be left alone:
- Examples in the tutorials (tutorial04.txt and tutorial05.txt) should be left alone.
- HomePageTemplateView should be left as HomePageView.
- AboutView should remain as AboutView
Otherwise, I can go through the changes that Carles made create a new PR, if this is all agreeable to you.
follow-up: 9 comment:8 by , 4 years ago
Thanks Jack for continuing the PR! Really appreciate the continuation :)
comment:9 by , 4 years ago
It's my pleasure, Carles!
PR was made. Here is the link: https://github.com/django/django/pull/14069
comment:10 by , 4 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Hi Carles. Yes, OK… 😄 I think this fits under the small cosmetic changes not needing a ticket. If you'd like to make a PR
Fixed #32271 -- Improved naming consistency in CBV code examples.
then that would be great.