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