#27101: args and kwargs not passed in BaseDetailView
-------------------------------------+-------------------------------------
     Reporter:  Autographic          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Generic views        |                  Version:  1.10
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  BaseDetailView       |             Triage Stage:
  kwargs                             |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by charettes):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Hi Autographic,

 I'm not sure I understand your report. While `*args` and `**kwargs` are
 passed to `BaseDetailView.get()` they are also stored as instance
 attributes during the
 
[https://github.com/django/django/blob/master/django/views/generic/base.py#L61-L68
 dispatching phase].

 I assume you're hitting this issue because you didn't use the
 [https://docs.djangoproject.com/en/1.10/ref/class-based-
 views/base/#django.views.generic.base.View.as_view as_view()] method of
 your `BaseDetailView` subclass which takes care of returning the
 appropriate instance factory.

 Is it possible that you created the view instance yourself and either
 passed the `dispatch` or `get` method directly to the `url` instance (e.g.
 `url(r'^$', BaseDetailViewSubclass().dispatch)`)?

 Please refer to the [https://docs.djangoproject.com/en/1.10/topics/class-
 based-views/ class based view documentation] for more details and reopen
 if you believe this is a Django bug.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.b30b0f57f702885b9a911747764af817%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to