in the end i found django-command-extensions ESSENTIAL
and INDISPENSIBLE in tracking and getting my head around
URLConf.
this extends django manage.py with a function called show_urls
after you have installed django-command-extensions, all you
have to do is type
python manage.py show_urls
to
I can't get this code to work perhaps I'm not importing something
but here is what I'm doing.
from mysite root dir
import settings
import urls
from django.core.urlresolvers import get_resolver
# i then do a little checking
print r
dir(r) # verifies _get_url_patterns is in r module
Here's one way. There's likely a cleaner option somewhere else:
from django.core.urlresolvers import get_resolver
r = get_resolver('mysite.urls')
for pattern in r._get_url_patterns(): print pattern
That works, at any rate.
Yours,
Eric
On Jan 23, 2009, at 3:55 AM, NoviceSortOf wrote:
>
>
>
* Is there a way to see a full URLConf list of all the imported URLs,
in
an application?
This seems it would be a big debuging help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
4 matches
Mail list logo