hello,

I am learning a lot from the B-List blog
Here is an entry, which could be interesting for you:
http://www.b-list.org/weblog/2007/nov/06/urlconf/
(specially the named URL patterns)

Bernd

On Nov 10, 5:53 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> I've also been a little frustrated with the {% url %} tag. It's very
> easy to mess it up, and very hard to figure out what's messed up. I
> wonder if we couldn't provide some debugging information if DEBUG is
> set to true.
>
> Todd
>
> On Nov 9, 2007 10:54 PM,  <[EMAIL PROTECTED]> wrote:
>
>
>
> > I really hope this isn't embarrassingly obvious but...
>
> > My {% url %} tags aren't producing anything -- no error and no url. My
> > current setup is so bare-bones I can't imagine what's gone wrong. Here
> > are the basics:
>
> > ROOT_URLCONF = Project.urls
>
> > In Project.urls:
> > (r'^$', 'app1.views.index'),
> > (r'^(?P<browseBy>authors|books|publishers)/$', 'app2.views.browse'),
>
> > The app2.views.browse view uses a render_to_response, with a
> > RequestContext. I've got no TEMPLATE_CONTEXT_PROCESSORS set, so I'm
> > using default.
>
> > app2.views.browse renders the app2/browse.html template, with no
> > context variables passed in except what the RequestContext puts in
> > there. I thought the problem was that ROOT_URLCONF wasn't available in
> > the template, but I imported that specifically and passed it in, with
> > the same result.
>
> > In app2/browse.html template:
> > <a href="{% url app1.views.index %}">Home</a>
> > (I've also tried Project.app1.views.index, and other variations, with
> > the same result)
>
> > All I want is a link to the homepage, but nothing is output. This is
> > the simplest case but the I get the same result in all my views and
> > templates. I'm using the development version of Django, and the
> > development server.
>
> > Can anyone see where I've got wrong? I tried setting the
> > TEMPLATE_STRING_IF_INVALID variable to '%s', but I guess this doesn't
> > actually count as an invalid template tag.
>
> > I'd be very grateful for any help!
>
> > Eric


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