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 django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to