One more question.

How does reverse decide which directories to look in for the named url
match?

I've got my main app (myapp) in one location and basic apps like a
blog installed on elsewhere on my python path. It appears the reverse
function keeps trying to look at myapp.blog_index instead of
blog.blog_index like it should be.



On Sep 16, 8:23 pm, brian mckinney <[EMAIL PROTECTED]> wrote:
> Thanks for checking the code Malcolm, you were right on, I was
> overlooking a line of code in my templates. Thanks again.
>
> On Sep 16, 7:27 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>
> > On Tue, 2008-09-16 at 14:33 -0700, brian mckinney wrote:
> > > I'm having a very similar problem. This code worked fine pre-Django
> > > 1.0, now I am really struggling to find the problem.
>
> > > url.py :
>
> > > url(r'^(?P<year>\d{4})/$', blog_views.post_archive_year,  name =
> > > "blog_archive_year"),
>
> > > views.py
>
> > > def post_archive_year(request, year):
> > >      return date_based.archive_year(request, year = 2007, queryset =
> > > Post.objects.published(), date_field = 'publish', make_object_list =
> > > True)
>
> > > Error:
>
> > > Caught an exception while rendering: Reverse for 'blog_index' with
> > > arguments '()' and keyword arguments '{}' not found
>
> > Something in your code is trying to do a reverse lookup (either by
> > calling reverse() explicitly or using the {% url %} template tag) for a
> > URL name or view called "blog_index". That isn't in the urls.py line you
> > listed, so either you've left something out or your code is trying to
> > look up a non-existent URL (which is an error in your code).
>
> > 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