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 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
> <[email protected] <mailto:[email protected]>> wrote:
>
>     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, it would look
>     something like
>
>     import polls
>     ...
>     url(r'^polls/', include(polls.urls))
>
>     /or/
>
>     from polls import urls as poll_urls
>     ...
>     url(r'^polls/', include(poll_urls))
>
>     Note that if you're using the 'lazy', quoted version you always
>     need to provide the full path.
>
>     _Nik
>
>
>     On 7/3/2012 4:24 PM, Smaran Harihar wrote:
>>     Hi Djangoers,
>>
>>     I just completed the tutorial 3 and got a little confused on the
>>     last section
>>     
>> <https://docs.djangoproject.com/en/dev/intro/tutorial03/#decoupling-the-urlconfs>
>>     of the tutorial,
>>
>>     urlpatterns = patterns('',
>>         url(r'^polls/', include('polls.urls')),
>>         url(r'^admin/', include(admin.site.urls)),
>>     )
>>     In this for the polls app, we are assigning the urls.py path in
>>     the quotes 'polls.urls'
>>     but for admin we are not?
>>
>>     So what is the difference and being it quotes how does it still
>>     pick up the path? Does django not consider it to be simply string.
>>
>>     -- 
>>     Thanks & Regards
>>     Smaran Harihar
>>
>>     -- 
>>     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] <mailto:[email protected]>.
>>     To unsubscribe from this group, send email to
>>     [email protected]
>>     <mailto:[email protected]>.
>>     For more options, visit this group at
>>     http://groups.google.com/group/django-users?hl=en.
>
>
>     -- 
>     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]
>     <mailto:[email protected]>.
>     To unsubscribe from this group, send email to
>     [email protected]
>     <mailto:django-users%[email protected]>.
>     For more options, visit this group at
>     http://groups.google.com/group/django-users?hl=en.
>
>
>
>
> -- 
> Thanks & Regards
> Smaran Harihar
>
> -- 
> 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.


-- 
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