Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
ViewDoesNotExist 'index' attribute in contrib.admin.views.main
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Florencio Cano  
View profile  
 More options Jul 21 2008, 5:38 am
From: "Florencio Cano" <florencio.c...@gmail.com>
Date: Mon, 21 Jul 2008 11:38:50 +0200
Local: Mon, Jul 21 2008 5:38 am
Subject: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
Hi!
I have updated Django from svn, installed a new app and some new
models and now when I try to browse /admin/ I get this error:

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florencio Cano  
View profile  
 More options Jul 21 2008, 6:32 am
From: "Florencio Cano" <florencio.c...@gmail.com>
Date: Mon, 21 Jul 2008 12:32:49 +0200
Local: Mon, Jul 21 2008 6:32 am
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
The problem is that in the last versions in the repository of Django
the Admin interface has changed. More info in:
http://www.djangoproject.com/documentation/admin/
I have read the documentation but now I have another error. Now the
error is with the template index of the admin interface:

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 <florencio.c...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cschand  
View profile  
 More options Jul 21 2008, 7:05 am
From: cschand <csch...@gmail.com>
Date: Mon, 21 Jul 2008 04:05:03 -0700 (PDT)
Local: Mon, Jul 21 2008 7:05 am
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
Did you add
admin.autodiscover()
in urls.py? I think the problem due to this
read
http://www.djangoproject.com/documentation/admin/#hooking-adminsite-i...

Satheesh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
V  
View profile  
 More options Jul 21 2008, 9:10 am
From: V <viktor.n...@gmail.com>
Date: Mon, 21 Jul 2008 06:10:52 -0700 (PDT)
Local: Mon, Jul 21 2008 9:10 am
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
I think the easyest way to see the difference is if you do a new
django-admin startproject, and check the comments in urls.py

then you can go on and have a look at the admin.site.root as well,
that is put in urls.py by default, but if you just want a basic admin
site, then probably you won't need it

at least, this is what I did, and now I understand pretty well what
has happened :)

V

On Jul 21, 12:32 pm, "Florencio Cano" <florencio.c...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florencio Cano  
View profile  
 More options Jul 21 2008, 9:15 am
From: "Florencio Cano" <florencio.c...@gmail.com>
Date: Mon, 21 Jul 2008 15:15:16 +0200
Local: Mon, Jul 21 2008 9:15 am
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
Yes. I already have done that:

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 <csch...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henhiskan  
View profile  
 More options Jul 30 2008, 10:03 pm
From: Henhiskan <henhis...@gmail.com>
Date: Wed, 30 Jul 2008 19:03:36 -0700 (PDT)
Local: Wed, Jul 30 2008 10:03 pm
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
I had the same problem. The solution is update the new url.py (you
already did )
and drop the database and then re-sync you project (remember do a
backup of your data).
The new admin class have new tables on database, that works from me.

Read this:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Merge...

Suerte.-


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henhiskan  
View profile  
 More options Jul 30 2008, 10:13 pm
From: Henhiskan <henhis...@gmail.com>
Date: Wed, 30 Jul 2008 19:13:07 -0700 (PDT)
Local: Wed, Jul 30 2008 10:13 pm
Subject: Re: ViewDoesNotExist 'index' attribute in contrib.admin.views.main
On Jul 30, 10:03 pm, Henhiskan <henhis...@gmail.com> wrote:

> I had the same problem. The solution is update the new url.py (you
> already did )
> and drop the database and then re-sync you project (remember do a
> backup of your data).
> The new admin class have new tables on database, that works from me.

> Read this:http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Merge...

> Suerte.-

... and also there was a change in the way to put your models into
admin
check this url:
http://www.djangoproject.com/documentation/admin/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »