I'm finding it hard to understand what exactly is passed to the patterns
method in Django.
You see, I usually have my urls.py
as:
urlspatterns = patterns('example.views',
(r'/$','func_to_call'),
)
Then in func_to_call
I would get everything I want from the request
object by using request.path
. However on a second take, it's really quite horrific that I'm ignoring Django's slickness for such a longer, less clean way of parsing - the reason being I don't understand what to do!
Let's say you have 3 servers you're putting your Django application on, all of which have a domain name and some variation like server1/djangoApplicationName/queryparams
, server2/application/djangoApplicationName
and server3/queryparams
. What will the urlpattern
get passed? The whole url? Everything after the domain name?