Okay. I think the issue is that I am trying to use reverse( ) in the
URLConf file. According to the django docs, "the reverse() function
has to import all of your URLConf files and examine the name of each
view". My thinking is that this is leading to to attempt to import
itself as it evaluates the URL.

Can anyone confirm this? Is there a known workaround?

Cheers,

David

On Oct 17, 11:25 am, dkadish <[EMAIL PROTECTED]> wrote:
> Do you know if there's an easy way to try and figure out where
> reverse( ) is looking for the pages?
>
> On Oct 17, 11:24 am, dkadish <[EMAIL PROTECTED]> wrote:
>
> > Nope. Tried that.
>
> > This shouldn't (I don't think) make any difference but I am running
> > Django 1.0, Python 2.5, Apache 2.210 on Windows Server 2003 with SQL
> > Server 2005 as the db (I know, I know...out of my hands)
>
> > David
>
> > On Oct 17, 11:19 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > > dkadish wrote:
> > > > I'm having issues with a named URL pattern in my code. Django does not
> > > > seem to be finding the correct URL when the {% url %} and reverse( )
> > > > tag/functions are used.
>
> > > > the urls.py file at app_root/project/urls.py contains:
>
> > > > from django.views.generic import list_detail, create_update
> > > > from maverick.project.models import Project
> > > > from django.conf.urls.defaults import patterns, url
> > > > from django.core.urlresolvers import reverse
>
> > > > urlpatterns = patterns('maverick.project.views',
> > > >     url(r'^$', list_detail.object_list, {'queryset':
> > > > Project.objects.all()}, 'project-home'),
> > > >     url(r'^new$', create_update.create_object, {'model': Project,
> > > > 'post_save_redirect': reverse('project-home')}, 'project-new'),
> > > > )
>
> > > > and I am referencing the URL pattern (in addition to in the second
> > > > link) in the file app_root/home/templates/base.html:
>
> > > > <html>
> > > >    <head>
> > > >            <link type="text/css" rel="stylesheet" href="/site_media/
> > > > maverick.css">
> > > >            <title>Maverick</title>
> > > >    </head>
> > > >    <body>
> > > >            <div id="nav">
> > > >                    <a href="{% url project-home %}">Projects</a>
> > > >                    <a href="{% url calibration-home %}">Calibrations</a>
> > > >            </div>
> > > >            <div id="menu">
> > > >                    {% block section_menu %}{% endblock %}
> > > >            </div>
> > > >            <div id="content">
> > > >                    {% block content %}{% endblock %}
> > > >            </div>
> > > >            <div id="footer">
> > > >                    {% block footer %}{% endblock %}
> > > >            </div>
> > > >    </body>
> > > > </html>
>
> > > > If you need more information, just let me know what to post.
>
> > > Looks like it should work. Does it make any difference if you change the
> > > minus signs to underscores?
>
> > > regards
> > >  Steve
--~--~---------~--~----~------------~-------~--~----~
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