Monday, August 3, 2015

Re: BaseListView's get_context_data is missing kwargs?

No problem. Not sure if you were looking at the source code or somewhere else, but Classy CBV's is always the place I start:

http://ccbv.co.uk/projects/Django/1.8/django.views.generic.list/ListView/

-James

On Aug 3, 2015 7:37 PM, "Ken" <teh@anl.gov> wrote:
@Jordi,  Thanks for tip on self.kwargs in View.  That should work.  I'll rewrite my get().

@James - No, no reason in particular.  Wasnt paying attention, I guess.  I was just staring at the get() method in BaseListView and thinking, ah, this is the place I want to inject my filter form into the context.  Thanks for the heads up on the docs.

Thanks for taking the time to respond.



On Sunday, August 2, 2015 at 5:41:29 PM UTC-5, James Schneider wrote:

Is there a reason you are using BaseListView rather than ListView? The docs mention that BaseListView is not really meant to be used directly. ListView also includes some extra context processing beyond the base class that may be of use.

-James

On Aug 2, 2015 3:21 PM, "jordi collell" <jor...@gmail.com> wrote:
Not sure if i'm understanding what are you saying. But kwargs on get.. Are stored on a object property. Self.kwargs (prior the dispatch) method.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5375c024-ee41-4b46-816d-e63fadb4a720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a9d1ded2-4175-41ad-ad8e-22f48edb9677%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWoy_P-tNK85eHuU2s-Gdt%3DoUt2Me0aY86DNd_RA1_d6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment