ViewDoesNotExist at /admin/

9 views
Skip to first unread message

diffyq

unread,
Dec 21, 2006, 12:05:15 AM12/21/06
to Django users
I've been struggling with this problem for a couple days now. We have
the development version of Django set up on a server with Apache
running Python through fcgi, and we have uncommented the requisite line
in urls.py and added django.contrib.admin to the INSTALLED_APPS tuple.
We get this error:

ViewDoesNotExist at /admin/
Tried index in module django.contrib.admin.views.main. Error was:
'module' object has no attribute 'index'
Request Method: GET
Request URL: http://miiandyou.net/admin/
Exception Type: ViewDoesNotExist
Exception Value: Tried index in module
django.contrib.admin.views.main. Error was: 'module' object has no
attribute 'index'
Exception Location:
/home/miiandu/django_src/django/core/urlresolvers.py in _get_callback,
line 129

We've tried reinstalling the whole mess three times now to no avail.
Any suggestions?

(Note: If you go to http://miiandyou.net/admin/ you can see the full
error report, including the traceback and the settings being used. If
you get a blank page with "Unhandled Exception," just refresh. For some
reason that keeps happening.)

Margaret

unread,
Dec 21, 2006, 12:08:28 AM12/21/06
to django...@googlegroups.com
settings.py

does you add this
'django.contrib.admin',

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
)

=======================================================


--
mawe...@gmail.com
13585201588

diffyq

unread,
Dec 21, 2006, 12:10:56 AM12/21/06
to Django users
Yes, I did add that line. We've been through this about ten times by
now, and I've read and reread the tutorial up to this point. You can
even check for yourself: http://miiandyou.net/admin/ scroll down to the
settings. It'll show you the value of INSTALLED_APPS.

Margaret

unread,
Dec 21, 2006, 12:16:58 AM12/21/06
to django...@googlegroups.com
yes, I saw your application.
try to
"chown" or "chmod" your django Directory

--------------------------------------------------------------------------------

mawe...@gmail.com
13585201588

tonemcd

unread,
Dec 21, 2006, 1:07:17 AM12/21/06
to Django users
Two things;
1) you don't have anything setup in TEMPLATE_DIRS - may be important...
2) what does this give you;

% ls -l /home/miiandu/django_src/django/contrib
you want admin to look something like this;
...
drwxr-xr-x 7 miiandyou 4096 Dec 4 18:19 admin
...
and;

% ls -l /home/miiandu/django_src/django/contrib/admin
...
drwxr-xr-x 3 herbert 4096 Dec 12 00:52 views
...

If they don't look like that, Margaret's suggestion of chown and chmod
is probably the thing you need to do.

hth
tone

diffyq

unread,
Dec 21, 2006, 1:51:08 AM12/21/06
to Django users
I just checked, and the permissions seem to be set properly. What
should be in TEMPLATE_DIRS? I don't recall the tutorial mentioning it.

eobanb

unread,
Dec 20, 2006, 3:12:51 AM12/20/06
to Django users
Hi,

I'm having a problem that I absolutely cannot figure out. I've
double-checked and re-checked urls.py (I have the right line
uncommented), settings.py (I have the django.contrib.admin as an
installed app), restarted fcgi, everything. I've tried the tutorial
from scratch three times now, each time rm -rfing the whole thing and
checking out the trunk from svn again after I get stuck. I just cannot
get through the tutorial because I cannot get the admin application to
work. This is what happens:

ViewDoesNotExist at /admin/
Tried index in module django.contrib.admin.views.main. Error was:
'module' object has no attribute 'index'

Additionally, I can't get the dev server to work either. I've bound it
to my IP and I try to connect on :8000 and it just times out. I don't
really care about that that much though as I have everything seemingly
set up with apache and fcgi.

--Eoban

Reply all
Reply to author
Forward
0 new messages