Make sure that all your static settings are okay on your app. Since you
mentioned that you are using apache;
install *mod_wsgi*
be sure to add some stuff to your httpd.conf file eg;
#added by guy
LoadModule wsgi_module modules/mod_wsgi.so
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Alias /appname/robots.txt "absolutepathtoapp/robots.txt"
Alias /appname/favicon.ico "absolutepathtoapp/favicon.ico"
#match main site resources
AliasMatch ^/appname/staticfolder/(.*) absolutepathtoapp/staticfolder/$1
Alias /appname/staticmediafolder/ "absolutepathtoapp/staticmediafolder/"
WSGIScriptAlias /appname"absolutepathtoapp/wsgi.py"
<Directory "absolutepathtoapprootfolder/Stark">
AllowOverride None
Options None
Order deny,allow
Allow from all
</Directory>
#end of added by guy
Replace the words applicably
On Fri, Oct 12, 2012 at 9:46 AM, luca72 <[email protected]> wrote:
> Thanks
> i have try but with no result, i have set as follow:
>
> MEDIA_ROOT =
> '/home/luca72/Scrivania/Quintas_Disegno_definitivo/quintas/quintas/static/'
> MEDIA_URL = '/static/'
> STATIC_URL = ''
> STATIC_ROOT = ''
> STATICFILES_DIRS =
> ('/home/luca72/Scrivania/Quintas_Disegno_definitivo/quintas/quintas/static/',
> inside the static i have made two folders images and css, now in the
> template i load the css in this way <link rel="stylesheet" type="text/css"
> href="..css/base.css" />
>
> But i get that he is not find, but the file base.css is inside the folder.
>
> i think that i have to configure MEDIA_ and STATIC_ ROOT and URL
> correctly.
>
> Can you help me to configure it.
>
> Thanks
>
> Luca
>
> Il giorno giovedì 11 ottobre 2012 17:07:01 UTC+2, Brad Pitcher ha scritto:
>>
>> I believe the best way of doing this is to have your image(s) in
>> static/images and your css in static/css. Then you can use a relative URL
>> to set the background image like so:
>>
>> background-image : url("../images/PAE.jpg")
>>
>> It's better not to have any CSS mixed in with your HTML anyway.
>> On Oct 11, 2012 7:49 AM, "luca72" <[email protected]> wrote:
>>
>>> hello my project is lacated here:
>>>
>>> /home/
>>> /luca72
>>> /Scrivania
>>> /Quintas_Disegno_definitivo
>>> /quintas/ here i have the file manage.py ,
>>>
>>> than i have the file settings,py here:
>>> /home
>>> /luca72
>>> /Scrivania
>>> /Quintas_Disegno_definitivo
>>> /quintas
>>> /quintas, here i have add a folder "static" with and
>>> image called PAE.jpg.
>>>
>>> How i have to configure the file setting.py in a way that in my template
>>> when i write via CSS background-image : url("PAE.jpg") the image is load
>>>
>>> I have try a lot of thing but i get that the image is not found.
>>>
>>> I use apache in localhost.
>>>
>>> Thaks
>>>
>>> Luca
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/**VXS19g9Ie7MJ<https://groups.google.com/d/msg/django-users/-/VXS19g9Ie7MJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to django-users...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/FqgYBYewPcUJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.