Re: Decoupling Urls

2012-07-05 Thread Smaran Harihar
Hey Nik, Thanks for the detailed explanation. It is clear now. Thanks, Smaran On Tue, Jul 3, 2012 at 5:47 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > Hi Smaran, > > Yes, by full path, I mean, for example, 'polls.urls'. And yes, it is a > string. Django interprets it as a mo

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
Sorry, I missed the second part of your first question. I would consider 'polls.urls' to be a full path from your project root. Depending on your configuration, it may also be something like 'myproject.polls.urls'. _Nik On 7/3/2012 5:14 PM, Smaran Harihar wrote: > Hey Nik, > > Thanks for the repl

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
Hi Smaran, Yes, by full path, I mean, for example, 'polls.urls'. And yes, it is a string. Django interprets it as a module path when it builds up the URLs. It's the same thing that happens in the polls.urls module when mapping the URL patterns to functions. The functions are all quoted as well (in

Re: Decoupling Urls

2012-07-03 Thread Smaran Harihar
Hey Nik, Thanks for the reply. When you say, provide full path for the lazy quoted version, do you mean 'polls.url' ? Is that not relative path? Also having the path in quotes 'polls.url', is it not a string? Thanks, Smaran On Tue, Jul 3, 2012 at 5:02 PM, Nikolas Stevenson-Molnar < nik.mol...@c

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
If I understand correctly, you're asking about the difference between include('polls.urls') and include(admin.site.urls)? Django will often let you reference modules, functions, and classes 'lazily', meaning you don't need to import them first. You could use the unquoted version for polls as well,

Decoupling Urls

2012-07-03 Thread Smaran Harihar
Hi Djangoers, I just completed the tutorial 3 and got a little confused on the last sectionof the tutorial, urlpatterns = patterns('', url(r'^polls/', include('polls.urls')), url(r'^admin/', include(admin.sit