On Tue, 2007-06-26 at 18:12 +0000, Justin wrote:
> I've just been screwing around with my urlpatterns, trying to clean
> them up. Mostly, I've been trying to remove all hard coded urls
> wherever they are, in templates and whatnot, by adding a name="foo" to
> my urlpatterns and then accessing them with {% url %} and reverse().
> 
> I'm wondering though, is it possible to use reverse() and pass it some
> args, to use it as the post_save_redirect in generic views? I've been
> trying to get it to work, but no luck so far... maybe I'm not passing
> the args properly? Or maybe it's not even possible?

I don't really understand the question you are asking. However, here's
the skinny: you give reverse any parameters -- named or positional --
that can appear in the URL and it returns a string. The only arguments
you can give are ones that appear in the URL pattern (the reg-exp).

If that's all you are trying to do, then perhaps give an example of how
you're trying to use reverse() and we can help you. If you're somehow
trying to influence the extra_dict (third) parameter in the url() line,
then you are trying to do something that reverse() is not designed for,
and which doesn't really make sense for URL creation.

Hope that might clear up some of your confusion, although, as I said,
I'm not quite sure what you were asking.

Regards,
Malcolm

-- 
The cost of feathers has risen; even down is up! 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to