Try this:

ADMIN_MEDIA_PREFIX = BASE_URL + 'media/admin/'

On Jan 28, 1:48 am, octopusgrabbus <old_road_f...@verizon.net> wrote:
> I am referring to Django's admin site. By not loading correctly, I
> mean the admin site works, but does not display the nice look and feel
> that displays when using Django's built in web server.
>
> "Do the static files (css, js) not load? Then maybe your paths in
> settings.py are not configured properly. "
>
> Yes, they do not load.
>
> To the best of my knowledge, I have no ModelAdmin instances.
>
> Here are the appropriate lines from project's settings.py
>
> # Main URL for the project
> BASE_URL = 'http://localhost:8002'
>
> # Absolute path to the directory that holds media
> #MEDIA_ROOT = '%s/media/' % BASE_PATH
> MEDIA_ROOT = '/usr/local/www/documentation/media'
>
> # URL that handles the media served from MEDIA_ROOT
> MEDIA_URL = '/media/'
>
> # URL prefix for admin media -- CSS, JavaScript and images.
> #ADMIN_MEDIA_PREFIX = "%sadmin/" % MEDIA_URL
> ADMIN_MEDIA_PREFIX = "admin/"
>
> INSTALLED_APPS = (
>     'django.contrib.auth',
>     'django.contrib.contenttypes',
>     'django.contrib.sessions',
>     'django.contrib.sites',
>     'django.contrib.messages',
>     'amr.login',
>     'amr.inventory_check',
>     # Uncomment the next line to enable the admin:
>     'django.contrib.admin',
>     # Uncomment the next line to enable admin documentation:
>     'django.contrib.admindocs',
> )
>
> Here are the appropriate settings from project's urls.py
>
>     #(r'^css(?P<path>.*)$', 'django.views.static.serve',
> {'document_root': '/home/amr/django/amr'}),
>     # Uncomment the admin/doc line below to enable admin
> documentation:
>     (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
>     # Uncomment the next line to enable the admin:
>     (r'^admin/', include(admin.site.urls)),
> )
>
> On Jan 27, 5:26 pm, Wim Feijen <wimfei...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Octopus,
>
> > What do you mean by: "won't load correctedly"?
>
> > Is there an admin interface at /admin/ ? If not, did you enable the
> > admin in your settings.py and in your urls.py?
>
> > Is there one or more object missing from the admin interface? If there
> > is one missing, maybe you've made an error in your admin.py file,
> > which causes the object not to load in the admin. Comment your
> > ModelAdmin instances and try again, if necessary go back to the most
> > basic admin.site.register(MyModel)
>
> > Do the static files (css, js) not load? Then maybe your paths in
> > settings.py are not configured properly.
>
> > Hope this helps, and if you need any further assistance please let us
> > know what exactly is wrong.
>
> > Good luck!
>
> > Wim
>
> > On Jan 27, 10:47 pm, octopusgrabbus <old_road_f...@verizon.net> wrote:
>
> > > I am running Django 1.2.4 and mod_wsgi. My application is running
> > > fine.
> > > My admin won't load correctly.
>
> > > wsgi_handler.py
> > > -----------------------
> > > import os
> > > import sys
>
> > > PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
> > > sys.path.append(PROJECT_ROOT)
> > > sys.path.append(os.path.join('/home/amr/django'))
> > > sys.path.append(os.path.join('/home/amr/django/amr'))
> > > sys.path.append(os.path.join('/home/amr/bin'))
> > > sys.path.append(os.path.join('/usr/local/www/documents/media'))
>
> > > os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'
> > > os.environ['PYTHON_EGG_CACHE'] = '/python_egg_cache'
>
> > > import django.core.handlers.wsgi
> > > application = django.core.handlers.wsgi.WSGIHandler()
>
> > > httpd.conf
> > > --------------
> > > Listen 8002
> > > <VirtualHost _default_:8002>
> > > DocumentRoot /usr/local/www/documents
> > > <Directory /usr/local/www/documents>
> > >     Order allow,deny
> > >     Allow from all
> > > </Directory>
>
> > > Alias /media/ /usr/local/www/documents/media/
> > > <Directory /usr/local/www/documents/media>
> > > Order deny,allow
> > > Allow from all
> > > </Directory>
>
> > > WSGIScriptAlias / /usr/local/www/wsgi-scripts/wsgi_handler.py
> > > <Directory /usr/local/www/wsgi-scripts>
> > >     Order allow,deny
> > >     Allow from all
> > > </Directory>
> > > #
> > > </VirtualHost>
>
> > > This link exists in /usr/local/www/documents/media
> > > media -> /usr/local/lib/python2.6/site-packages/django/contrib/admin/
> > > media
>
> > > according to the documentation.
>
> > > I'm missing something, and just cannot see it. Pointers in fixing this
> > > would be appreciated.
> > > Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to