On Tue, 2008-09-16 at 21:34 -0700, brian mckinney wrote:
> Thanks for your reply Malcolm. I really appreciate all of your help.
> 
> Based on your advice, I did some testing and added some views that are
> under my myapps directory and they immediately worked. Changing to a
> view name in any other directory besides where my main app lives seems
> to fail. This is something that was working prior to upgrading to
> 1.0.
> 
> Are you sure that nothing has changed regarding how the reverse looks
> up URLs due to this: http://code.djangoproject.com/changeset/8760

Certainly stuff changed. A few hundred lines of it. However, none of the
advertised functionality was meant to have changed. Since you haven't
actually posted any examples, it's impossible to tell if what you're
seeing is a bug or something that just worked by accident previously and
wasn't intentional. There are, for example, some unpredictability if you
are using a view name where the view is referred to as a reference to a
Python function object (rather than a string) in the urlpatterns. But
that was fragile before, too. It might be differently fragile now, I
don't know. I also don't really care, since it's basically impossible to
guarantee it will work correctly (which is why none of the documentation
for reverse() and url tags use examples that are function references;
only string view names or "name=..." names).

All that aside, in the interests of moving forwards the easiest way to
get around this hurdlewould be to use the url(....., name="foo") form of
URL patterns. Coming up with unique, short names is easy and leads to
much shorter url tags and patterns. Then your view names aren't
susceptible to import paths or anything. You can call them things like
"blog-entry" and it will never change.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to