<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ciao,<br>
non ricordo alla meglio django, ma riguardando un mio vecchio repo
<a class="moz-txt-link-rfc2396E" href="https://github.com/gdassori/BitcoinAVM/blob/master/BitVending/settings.py"><https://github.com/gdassori/BitcoinAVM/blob/master/BitVending/settings.py></a>,
è venuto fuori che usavo :<br>
<span style="color: rgb(51, 51, 51); font-family: Consolas,
'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 16.7999992370605px; orphans:
auto; text-align: start; text-indent: 0px; text-transform: none;
white-space: pre; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(255, 255, 255);"><br>
BASE_DIR </span><span class="pl-k" style="box-sizing: border-box;
color: rgb(167, 29, 93); font-family: Consolas, 'Liberation Mono',
Menlo, Courier, monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 16.7999992370605px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: pre; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">=</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo,
Courier, monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 16.7999992370605px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: pre; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255, 255,
255);"> os.path.dirname(os.path.dirname(</span><span class="pl-sv"
style="box-sizing: border-box; color: rgb(0, 134, 179);
font-family: Consolas, 'Liberation Mono', Menlo, Courier,
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
16.7999992370605px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">__file__</span><span
style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation
Mono', Menlo, Courier, monospace; font-size: 12px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: 16.7999992370605px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: pre; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(255, 255, 255);">))</span><br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<span style="color: rgb(51, 51, 51); font-family: Consolas,
'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 16.7999992370605px; orphans:
auto; text-align: start; text-indent: 0px; text-transform: none;
white-space: pre; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(255, 255, 255);">STATICFILES_DIRS </span><span
class="pl-k" style="box-sizing: border-box; color: rgb(167, 29,
93); font-family: Consolas, 'Liberation Mono', Menlo, Courier,
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
16.7999992370605px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">=</span><span style="color:
rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo,
Courier, monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 16.7999992370605px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: pre; widows:
auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255, 255,
255);"> (BASE_DIR </span><span class="pl-k" style="box-sizing:
border-box; color: rgb(167, 29, 93); font-family: Consolas,
'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 16.7999992370605px; orphans:
auto; text-align: start; text-indent: 0px; text-transform: none;
white-space: pre; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);">+</span><span style="color: rgb(51, 51, 51); font-family:
Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 16.7999992370605px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255, 255);"> </span><span
class="pl-s1" style="box-sizing: border-box; color: rgb(223, 80,
0); font-family: Consolas, 'Liberation Mono', Menlo, Courier,
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
16.7999992370605px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);"><span class="pl-pds"
style="box-sizing: border-box; color: rgb(223, 80, 0);">'</span>/static/<span
class="pl-pds" style="box-sizing: border-box; color: rgb(223,
80, 0);">'</span></span><span style="color: rgb(51, 51, 51);
font-family: Consolas, 'Liberation Mono', Menlo, Courier,
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
16.7999992370605px; orphans: auto; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255, 255);">,)<br>
<br>
</span>Spero sia d'aiuto.<br>
Guido<br>
<br>
<div class="moz-cite-prefix">Il 16/02/2015 20:11, Ivan B. ha
scritto:<br>
</div>
<blockquote cite="mid:54E240DA.4020003@bgrtt.net" type="cite">
<br>
<br>
In settings.py ho inserito:
<br>
STATIC_URL = '/static/'
<br>
e controllato che ci fosse 'django.contrib.staticfiles' in
installed_apps
<br>
<br>
Nel template ho inserito:
<br>
{% load staticfiles %}
<br>
<img src="{% static "img/prova.png" %}" alt="Prova" />
<br>
<br>
Il mio progettino di test si chiama (che fantasia) progetto. La
directory static che contiene a sua volta "/img/prova.png" ho
provato a posizionarla nella root di progetto (dove c'è
manage.py), all'interno di "progetto/progetto/" e all'interno di
"progetto/progetto/templates". In nessuna delle tre prove sono
riuscito ad ottenere il caricamento dell'immagine. Quindi deduco
che non ho capito nulla e ho sbagliato la configurazione.
<br>
<br>
Cosa mi perdo per strada? SPero di essere stato un poco più chiaro
:'(
<br>
Grazie mille, buona serata!
<br>
Ivan
<br>
_______________________________________________
<br>
</blockquote>
<br>
</body>
</html>