Thank you IT-India now I understand what all the programmers are talking
about. :)
http://agiliq.com/blog/2012/06/understanding-args-and-kwargs/
*[Problem SOLVED]*
On Monday, July 22, 2013 11:51:48 AM UTC+2, Pepsodent Cola wrote:
>
> Hi,
>
> Can I only have one "get_queryset" for each Viewpage?
Thanks Tom that got rid of the Debug message.
My views.py code and index.html code now looks like this. But how exactly
do I send my IndexView query results (filter1, 2 and 3) to my index.html
template file?
The only thing I see on the webpage is this result:
No polls are available.
*views.py
On Fri, Jul 26, 2013 at 9:57 AM, Pepsodent Cola wrote:
>
> I am having trouble understanding what the Debug wants me to fix and how
> to fix it?
> Isn't my models already defined? Isn't my queryset already defined in
> variables filter_1, 2 and 3?
>
> Exception Type: ImproperlyConfigured
> Except
s latest_poll_list in the context
> filter2 = Word.blah()
> filter3 = Word.blah_blah()
> context.update({
> "filter2": filter2,
> "filter3": filter3
> })
> return context
>
> Sent from my Windows Phone
> -
Windows Phone
> --
> From: Pepsodent Cola
> Sent: 7/22/2013 9:47 PM
> To: django-users@googlegroups.com
> Subject: Re: Can I only have one "get_queryset" per Viewpage?
>
> I'm having difficulty understanding the abstract explanations
.blah()
filter3 = Word.blah_blah()
context.update({
"filter2": filter2,
"filter3": filter3
})
return context
Sent from my Windows Phone
--
From: Pepsodent Cola
Sent: 7/22/2013 9:47 PM
To: django-users@googlegroups.com
Subject
I'm having difficulty understanding the abstract explanations in that
documentation.
Could you or somebody else explain this, by showing by example using my
code examples?
*views.py*
class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = *'latest_pol
Hi, you can separate your querysets in get_context_data method.
See:
https://docs.djangoproject.com/en/dev/ref/class-based-views/mixins-simple/#django.views.generic.base.ContextMixin.get_context_data
2013/7/22 Pepsodent Cola
> Hi,
>
> Can I only have one "get_queryset" for each Viewpage?
> If I
8 matches
Mail list logo