On Thu, 2009-03-05 at 22:42 -0800, John M wrote:
> Well, given my example, i would think it does.

I'm sorry you think that, but if it was clear to me, I wouldn't have
asked the question. At no point in your earlier posts did you show any
examples of or mention using generic views.

>   I put the generic's in
> the URL.PY file and it's not performing as planned, I'm not sure how I
> would keep the generic view inside the URL and get what I want?

A generic view in a URL Conf file is just a function reference that is
called. It sounds like the problem is some initial data that you're
wanting to set up. You need that to be executed each time if it's ever
going to change (such as the concept of "one week ago"), so it also has
to be inside a function that is called, which means not just using
generic views.

A reasonably natural way to do that if you're using a generic view and
want to pass in extra information is to write a view function which does
all the initial setup and then passes the dynamic information via the
extra_context parameter to the generic view.

Here's an old blog post I wrote on this topic which has some concrete
code samples and is still valid today:

http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-generic-views/

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to