(Django release 1.1)
Hi, i have an application within my project, call it app1. It has
urls.py within its directory. That project.app1.urls does not get
included within ROOT_URLCONF(which points to 'project.urls'). I needed
project.app1.urls be isolated from other urls. Then i wrote a
middleware implementing process_request and injecting a urlconf
attribute to some of the requests(those requests related to app1) with
request.urlconf = 'project.app1.urls'.

The problem is, when i do {% url named_url %} within a template, i get
NoReverseMatch exception.
Looking through django source, i see that render method of URLNode
class within defaulttags.py tries a reverse. It does not supply named
parameter "urlconf" to reverse method and so it can not resolve the
url. I need a way to modify this behaviour so the url actually gets
resolved. I don't know if namespaces would solve my problem? request
object passed to the template has indeed a urlconf parameter, but it
is not used when doing reverse within URLNode class' render method.
Thanks in advance for any pointers, ideas.
--~--~---------~--~----~------------~-------~--~----~
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