For 1., did you import play_django?
On Jun 21, 11:17 am, tekion <[email protected]> wrote:
> All,
> I noticed that putting single quote around include argument makes a
> different, for example:
> (r'^admin/', include(admin.site.urls)),
> (r'^polls/', include('play_django.polls.urls')),
> works. Where as:
> (r'^admin/', include(admin.site.urls)),
> (r'^polls/', include(play_django.polls.urls)),
>
> yield this error:
> NameError at /polls/
>
> name 'play_django' is not defined
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/polls/
> Exception Type: NameError
> Exception Value:
>
> name 'play_django' is not defined
>
> Two question:
> 1. why putting single quotes works, no NameError was thrown for
> play_django.
> 2. why admin.site.urls works without quote and putting quote around it
> doesn't, this is an inconsistency that really bothers me.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---