This line should be commented out: "Uncomment the next two lines to enable the admin:"
Also, I don't see why it's trying to import 'polls.views.index'. That would be a function named 'index' in your views.py file in the polls directory (also known as a module). Not only does that 'index' method/function not exist, I don't see anywhere in your urls.py that indicates you are trying to load or otherwise reference that method. So as Melvyn implied, are you sure this source code you presented is exactly the same as you're trying to run? I think he assumed you were using a WSGI Handler -- but runserver should pick up any changes that you make up to the structure automatically. Can you share the traceback that your web browser shows when you try to access your Django application? Just make sure to hide any private/sensetive data: http://localhost:8000 after executing 'python manage.py runserver' On Wed, Aug 15, 2012 at 10:45 PM, Sky <a.technicolor.s...@gmail.com> wrote: > How do I do that? > > I've tried the commands python manage.py syncdb followed by python > manage.py runserver several times but they don't work. > > > On Wednesday, August 15, 2012 9:45:21 PM UTC+8, Melvyn Sopacua wrote: >> >> On 15-8-2012 10:01, Pengfei Xue wrote: >> > there's no function in views.py, you should define that 'index' >> > handler >> >> No, he's not using it according to source. >> Which means the source is not in sync with what is being run, typically >> fixed by restarting the WSGI provider. >> >> -- >> Melvyn Sopacua >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/VTBxdWtZXTYJ. > > 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. > -- 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.