Opened 12 years ago
Closed 12 years ago
#18701 closed Bug (fixed)
Class Based VIew docs about JSONResponseMixin misleading
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | cbv, class based views, docs |
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
Maybe I am wrong but the docs suggest to use the JSONResponseMixin like so:
from django.views.generic import View class JSONView(JSONResponseMixin, View): pass
I feel that this doesn't make sense because View never calls any of the methods implemented in the JSONResponseMixin. It would make much more sense to inherit from TemplateView here instead of View.
The relevant part of the docs can be found here: https://docs.djangoproject.com/en/dev/topics/class-based-views/#more-than-just-html
Change History (2)
comment:1 by , 12 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
Yup.
I tried out githubs - edit file in browser with small change, create a pull request. Pretty easy.
https://github.com/django/django/pull/282
I'm self marking this as RFC because it is pretty trivial