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" <luca...@libero.it <javascript:>> 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. >> To post to this group, send email to django...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> django-users...@googlegroups.com <javascript:>. >> 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 view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/FqgYBYewPcUJ. 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.