You are not logged in.

Change Language:

Profile for camobrite

Name camobrite
Email Address n/a
Posts3
  • Re: permission denied message, no login page at /admin/
    Board » Getting Started » Setup and Configuration
    I figured it out! I had my ADMIN_MEDIA_PREFIX variable in settings.py set to '/admin/'. That's why I couldn't get permission to access the /admin/ url. Changing this setting to '/adminmedia/' solved the problem.
  • Re: permission denied message, no login page at /admin/
    Board » Getting Started » Setup and Configuration
    Thanks for your reply - that's very encouraging! I looked at the django.contrib.admin files and they all had their permissions set rw-r--r-- with root user and group. I wonder which file is being opened and if it's being opened read only? Here's the output of ls:

    bsmith@kano:/usr/share/pyshared/django/contrib/auth$ ls -l
    total 92
    -rw-r--r-- 1 root root  6046 2009-04-18 17:04 admin.py
    -rw-r--r-- 1 root root  5364 2009-03-15 01:54 backends.py
    -rw-r--r-- 1 root root   217 2008-06-08 04:45 create_superuser.py
    -rw-r--r-- 1 root root  3543 2009-04-01 12:17 decorators.py
    drwxr-xr-x 2 root root  4096 2010-03-02 13:26 fixtures
    -rw-r--r-- 1 root root  8431 2009-02-26 12:11 forms.py
    drwxr-xr-x 2 root root  4096 2010-03-02 13:26 handlers
    -rw-r--r-- 1 root root  3163 2009-03-18 12:55 __init__.py
    drwxr-xr-x 3 root root  4096 2010-03-02 13:26 management
    -rw-r--r-- 1 root root  3552 2009-03-15 01:54 middleware.py
    -rw-r--r-- 1 root root 14736 2009-03-30 18:00 models.py
    drwxr-xr-x 3 root root  4096 2010-03-02 13:26 tests
    -rw-r--r-- 1 root root  2393 2009-04-01 17:25 tokens.py
    -rw-r--r-- 1 root root   912 2008-08-23 14:20 urls.py
    -rw-r--r-- 1 root root  7607 2009-04-01 13:02 views.py
    
  • permission denied message, no login page at /admin/
    Board » Getting Started » Setup and Configuration
    Hi everyone,

    I'm a newbie to django and I've been having trouble getting to the admin page for my site. I'm running django 1.1 on ubuntu 9.10. I followed these instructions at djangobook.com for setting up my admin page, but when I go to the admin page url on my development server, instead of getting the login page or even a formatted error page, I get a simple page with no markup that only says "Permission denied: /admin/". I'm clueless as to how to handle this.

    From settings.py, my installed apps:
    INSTALLED_APPS = (
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.sites',
        'django.contrib.admin',
        'pizza.app',
    )
    


    my middleware classes:
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )
    


    my urls.py:
    from django.conf import settings
    from django.conf.urls.defaults import *
    from pizza.views import *
    from django.contrib import admin
    admin.autodiscover()
    
    urlpatterns = patterns('',
                           ('^home/$', home),
                           ('^menu/$', menu),
                           ('^location/$', location),
                           (r'^admin/', include(admin.site.urls)),
                           )
    
    if settings.DEBUG:
        urlpatterns += patterns('',
                                (r'^media/(?P<path>.*)$', 'django.views.static.serve', 
                                 {'document_root': '/var/www/pizza/media'}),
                                )
    


    Any help or direction on this would be very much appreciated!

    -B


Powered by Sphene Community Tools