Hrm… If your server is serving the actual page fine, then it should be
configured all right.  I'll have to take a different approach, maybe
I'm overlooking where and how you're doing this?

1.
Is this is failing when you do the reverse from the shell? Do you have
all the proper environment variables set in your shell—or much easier
did you launch the shell with: "python manage.py shell" from you
projects root directory?

2.
You mentioned seeing that error when you restarted lighttpd—do your
actual pages work fine and do the {% url ... %} correctly each time,
except when you restart? I have found on apache restarts that django
will spit up really strange errors like failing on a url reverse that
should work or being unable to get some attribute from the request
object that should be there—since this only happens on restarts and I
haven't found a good explanation of why it happens, I generally have
been ignoring it.

If I'm off on those ones, then I'm not sure what's wrong apart from
looking at your code—does "reverse" work for any of your other urls in
your app? Maybe read through some examples in the docs or tutorial to
see if you're just doing some step wrong?

Good luck!

--
Peter

On Sep 9, 5:29 pm, Streamweaver <streamwea...@gmail.com> wrote:
> Yet more info here.  This might be a particular problem due to the
> particular method being called in multiple URL patterns so I tried
> making it and calling a named URL pattern but am getting the same
> message.
>
> On Sep 9, 5:18 pm, Streamweaver <streamwea...@gmail.com> wrote:
>
> > Thanks for all the replies.  I'm on Django 1.0.2 btw if it makes a
> > difference, I see the extra-patterns.  I'm also running this via the
> > manage.py runserver on a development machine and not in staging or
> > production.
>
> > For the original authors, those variations turn up the same error.
>
> > To Peters enumerated questions.
>
> > 1.  yep it resolves fine.
> > 2.  It seems to be.  It's replicated in both settings.py and
> > localsettings.py.
> > 3.  the ROOT_URLCONF points to my base app urls.py and that points to
> > the subsequent urls.py under that project via the line
> > (r'^project/', include('dwrangler.project.urls')).  Both of these
> > contain a urlpatterns attribute.
>
> > So the method I'm calling isn't in dwrangler.urls but in
> > dwrangler.project.urls
>
> > Additional curiousities, if I kill the lighthttp server and restart it
> > I get a new error:
>
> >         "Caught an exception while rendering: Reverse for 
> > 'dwrangler.project-
> > root' with arguments '()' and keyword arguments '{}' not found."
>
> > This is interesting because it's throwing the error message for a
> > template tag that has worked that calls a names URL pattern in the
> > dwrangler.project.urls file.  So this seems to be only reading from
> > the dwrangler.urls file and not the included dwrangler.project.urls
>
> > I'm still struggling with this so any other insight may help.
>
> > Thanks for all the feedback so far.
>
> > On Sep 8, 5:31 pm, Peter Coles <pe...@hunch.com> wrote:
>
> > > What you provided looks correct -- which means that something else is
> > > probably broken...
>
> > > Some things to investigate:
>
> > > 1. If you manually go that url: http:<your_domain>/in_development/
> > > does anything get served?
> > > 2. Is your ROOT_URLCONF setup to properly point to this file in your
> > > settings file?
> > > 3. Is this another url file than the one defined in your ROOT_URLCONF?
> > > If so are you properly "including" this one from your root urls.py?
> > > Details on include 
> > > here:http://docs.djangoproject.com/en/dev/topics/http/urls/#including-othe...
>
> > > You'll find a wealth of information about urls in django 
> > > here:http://docs.djangoproject.com/en/dev/topics/http/urls/
>
> > > Once you get it working, you may find it more convenient to use named
> > > url 
> > > patterns:http://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-pat...
>
> > > On Sep 8, 1:49 pm, Streamweaver <streamwea...@gmail.com> wrote:
>
> > > > I'm having trouble understanding the output of the reverse method.
>
> > > > I have the following URL pattern:
>
> > > > urlpatterns = patterns('dwrangler.project.views',
> > > >     (r'^in_development/$', 'summary_in_development'),
> > > > )
>
> > > > from the documentation I would think I can get the URL by using
>
> > > > reverse('dwrangler.project.views.summary_in_development')
>
> > > > But I keep getting a NoReverseMatch error.  I have tried several
> > > > different formats but keep getting similar errors.
>
> > > > I must be missing something obvious and would be thankful if something
> > > > could point me in the right direction.
>
> > > > Thanks
--~--~---------~--~----~------------~-------~--~----~
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