Opened 2 years ago

Closed 23 months ago

#18701 closed Bug (fixed)

Class Based VIew docs about JSONResponseMixin misleading

Reported by: mbrochh@… 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


Maybe I am wrong but the docs suggest to use the JSONResponseMixin like so:

from django.views.generic import View

class JSONView(JSONResponseMixin, View):

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:

Attachments (0)

Change History (2)

comment:1 Changed 23 months ago by ptone

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin


I tried out githubs - edit file in browser with small change, create a pull request. Pretty easy.

I'm self marking this as RFC because it is pretty trivial

comment:2 Changed 23 months ago by aaugustin

  • Resolution set to fixed
  • Status changed from new to closed

Merged in [0d1653395b].

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.