Hi, so I did the tutorial and did a simple modification in order to
get 'polls' views and 'admin' view too but I am failing.
It's that:
for mysite/urls.py:
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/(.*)', admin.site.root),
(r'^polls/', include('mysite.polls.urls')),
)
But, if so, then admin pages failed (
http://localhost:8000/admin/):
TemplateSyntaxError at /admin/
Caught an exception while rendering: Tried vote in module
mysite.polls.views. Error was: 'module' object has no attribute 'vote'
...
If I want 'admin' view, then I have to comment out line "(r'^polls/',
include('mysite.polls.urls')),"
Well, I must confess that my knowledge on regexp is limited. So, in
the end, what should I do about mysite/urls.py in order to get both
admin and polls pages working?
Many thanks in advance,
Alan