ViewDoesNotExist: Tried index in module
django.contrib.admin.views.main. Error was: 'module' object has no
attribute 'index'
I have checked that my user is the owner of all the files in
django.contrib.admin.views and I have checked that there not exist any
method in django.contrib.admin.views.main called index.
What is this attribute used for and how I can fix this error?
TemplateSyntaxError at /admin/
Caught an exception while rendering: u'user' Original Traceback (most
recent call last): File
"/usr/lib/python2.4/site-packages/django/template/debug.py", line 71,
in render_node result = node.render(context) File
"/usr/lib/python2.4/site-packages/django/contrib/admin/templatetags/log.py",
line 18, in render self.user = context[self.user].id File
"/usr/lib/python2.4/site-packages/django/template/context.py", line
43, in __getitem__ raise KeyError(key) KeyError: u'user'
After reading the document the most importante change I see is
extracting the Admin class from the models and creating another class
called MyModelAdmin that extends admin.ModelAdmin and modifying the
urls.py to include:
urlpatterns = patterns('',
('^admin/(.*)', admin.site.root),
[...]
Any ideas to solve this problem in the new Admin interface version?
2008/7/21 Florencio Cano <florenc...@gmail.com>:
from django.conf.urls.defaults import *
from django.contrib import admin
import os
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^seinhe/', include('seinhe.foo.urls')),
# Uncomment this for admin:
('^admin/(.*)', admin.site.root),
2008/7/21 cschand <csc...@gmail.com>: