I have a site with Django that runs some custom applications. I did not use Django ORM, just presentation and templates, but now I need to save some information, so I created several models in one application and enabled Admin.
The problem is that when I log into Admin, it just says: "You do not have permission to edit anything," even the Auth application does not appear on the page. I am using a single user created using syncdb as root.
On the same server, I have another site that just uses admin.
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 everything in Gentoo Linux 2.6.23
Any ideas where I can find a solution?
Many thanks.
UPDATE: it works with the development server. I bet this has something to do with some file system permissions, but I just can't find them.
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 am running python manage.py from the directory / var / django / gpx
- GPX site, one of the applications is contable and lives in / var / django / gpx / contable
- the apache user is a webdev group, and all of these directories and files belong to this group and have rw permission
UPDATE 4: confirmed that the settings file is the same for apache and runerver (renamed it and both broke)
UPDATE 5: / var / django / gpx / contable / init .py exists
This is the relevant part of urls.py:
urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), ) urlpatterns += patterns('gpx', (r'^$', 'menues.views.index'), (r'^adm/$', 'menues.views.admIndex'),
python django django-admin permissions
Facundo casco
source share