Django Admin: not seeing any app (permission problem?)

Posted by Facundo on Stack Overflow See other posts from Stack Overflow or by Facundo
Published on 2009-12-18T17:45:02Z Indexed on 2010/04/11 9:03 UTC
Read the original article Hit count: 437

I have a site with Django running some custom apps. I was not using the Django ORM, just the view and templates but now I need to store some info so I created some models in one app and enabled the Admin.

The problem is when I log in the Admin it just says "You don't have permission to edit anything", not even the Auth app shows in the page. I'm using the same user created with syncdb as a superuser.

In the same server I have another site that is using the Admin just fine.

Using Django 1.1.0 with Apache/2.2.10 mod_python/3.3.1 Python/2.5.2, with psql (PostgreSQL) 8.1.11 all in Gentoo Linux 2.6.23

Any ideas where I can find a solution?

Thanks a lot.

UPDATE: It works from the development server. I bet this has something to do with some filesystem permission but I just can't find it.

UPDATE2: vhost configuration file:

<Location />
  SetHandler python-program
  PythonHandler django.core.handlers.modpython
  SetEnv DJANGO_SETTINGS_MODULE gpx.settings
  PythonDebug On
  PythonPath "['/var/django'] + sys.path"
</Location>

UPDATE 3: more info

  • /var/django/gpx/init.py exists and is empty
  • I run python manage.py from /var/django/gpx directory
  • The site is GPX, one of the apps is contable and lives in /var/django/gpx/contable
  • the user apache is webdev group and all these directories and files belong to that group and have rw permission

UPDATE 4: confirmed that the settings file is the same for apache and runserver (renamed it and both broke)

UPDATE 5: /var/django/gpx/contable/init.py exists

This is the relevan part of urls.py:

urlpatterns = patterns('',
                       (r'^admin/', include(admin.site.urls)),
                      )
urlpatterns += patterns('gpx',
   (r'^$',                         'menues.views.index'),
   (r'^adm/$',                     'menues.views.admIndex'),

© Stack Overflow or respective owner

Related posts about django

Related posts about python