Re: Need help including a queryset in every view

2008-06-27 Thread Brandon Taylor

Holy shiesse, the man himself! Thank you very much for pointing me to
that portion of the documentation, I hadn't quite made it there in my
Definitive Guide book, but that's exactly what I needed. I ordered the
Practical Django projects book the other day, can't wait to get it!

Kind regards,
Brandon

On Jun 27, 6:14 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 27, 2008 at 4:27 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> > What's the best way to go about this? Obviously I don't want to have
> > to pass the queryset into the context of every action, in every view
> > across the entire site :)
>
> Same way you make anything accessible to lots of different template contexts:
>
> http://www.djangoproject.com/documentation/templates_python/#subclass...
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Need help including a queryset in every view

2008-06-27 Thread James Bennett

On Fri, Jun 27, 2008 at 4:27 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> What's the best way to go about this? Obviously I don't want to have
> to pass the queryset into the context of every action, in every view
> across the entire site :)

Same way you make anything accessible to lots of different template contexts:

http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Need help including a queryset in every view

2008-06-27 Thread ristretto.rb

> I have a navigation list powered by a model in my base site template.
> So, I need to create a queryset object that will be available to every
> view.

Middleware comes to mind (see the docs), but I'm new to django, and
perhaps that's not the best way.  I'd be interested to see what other
djangonauts say.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Need help including a queryset in every view

2008-06-27 Thread Brandon Taylor

Hello everyone,

I have a navigation list powered by a model in my base site template.
So, I need to create a queryset object that will be available to every
view.

What's the best way to go about this? Obviously I don't want to have
to pass the queryset into the context of every action, in every view
across the entire site :)

Help appreciated!
Brandon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---