Hi all,

I want to start a very simple tree-structure cms django app. Reading about
django all day yesterday, my plan is to have the urlconf capture every and
all urls by:
(r'', 'pages.views.index')

and use the request.url object to differentiate between the pages by
checking them against a .url attribute of the pages model.
If request.url="/" I have to be at the index page, right? So it 'll be
something like
try:
pages.object.get(url=request.url)
except:
return a 404

1) Is it good practice to have a urlconf capture everything and is my regex
of empty string waterproof?
2) Is r'^.*$' any better?
3) Why do most examples use (?P<url>) to capture the url instead of
request.url that gets passed to the view anyway already?

-- 
Urga Digital FX,
Engelstraat 167
9040 Gent
www.urga.be

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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