Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 2, 2010 18:17:40

ozgur y.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

django admin css problem


Hi,

Yesterday i moved my site to a linux solution. Everything is going
fine, except admin site. When i go to url example.com/admin, the
template doesnt work. When i look at the source, i see these:

<link rel="stylesheet" type="text/css" href="/media/css/base.css" />
<link rel="stylesheet" type="text/css" href="/media/css/login.css" />

But i dont have any urls or files on example.com/media/css/base.css

or

example.com/media/css/login.css

How can i fix this problem? When working on localhost with
"runserver", these CSS files are NOT missing.

Do you have any idea?

Thanks,

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

Offline

#2 Dec. 2, 2010 18:30:47

ozgur y.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

django admin css problem


I found the answer. The problem was about the apache (httpd) configuration.

When i add the following to httpd config, the problem is solved:

<Directory "Path-to-python/Lib/site-packages/django/contrib/admin/media/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Alias /media/ "Path-to-Python/Lib/site-packages/django/contrib/admin/media/"




2010/12/2 ozgur yilmaz <yelb...@gmail.com>:
> Hi,
>
> Yesterday i moved my site to a linux solution. Everything is going
> fine, except admin site. When i go to url example.com/admin, the
> template doesnt work. When i look at the source, i see these:
>
> <link rel="stylesheet" type="text/css" href="/media/css/base.css" />
> <link rel="stylesheet" type="text/css" href="/media/css/login.css" />
>
> But i dont have any urls or files on example.com/media/css/base.css
>
> or
>
> example.com/media/css/login.css
>
> How can i fix this problem? When working on localhost with
> "runserver", these CSS files are NOT missing.
>
> Do you have any idea?
>
> Thanks,
>

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

Offline

#3 Dec. 2, 2010 18:35:45

o.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

django admin css problem


I failed to provide the following information in a similar post, and
it slowed down responses.

1) What web server are you using? If it is not the built in
development server, please provide the configuration for Django.

2) Check your application's settings.py file and make sure the
appropriate items are uncommented to allow the admin site to run, like
the following (partial list)

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',
)

from urls.py

urlpatterns = patterns('',
.
.
.
# 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)),
)

Is there anything pertinent in your web server's logs?
cmn

On Dec 2, 1:17 pm, ozgur yilmaz <yelb...@gmail.com> wrote:
> Hi,
>
> Yesterday i moved my site to a linux solution. Everything is going
> fine, except admin site. When i go to url example.com/admin, the
> template doesnt work. When i look at the source, i see these:
>
> <link rel="stylesheet" type="text/css" href="/media/css/base.css" />
> <link rel="stylesheet" type="text/css" href="/media/css/login.css" />
>
> But i dont have any urls or files on example.com/media/css/base.css
>
> or
>
> example.com/media/css/login.css
>
> How can i fix this problem? When working on localhost with
> "runserver", these CSS files are NOT missing.
>
> Do you have any idea?
>
> Thanks,

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

Offline

Board footer

Moderator control

Enjoy the 24th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support