Hi all, 

i will tray it.. thanks for your attention 


Pada Senin, 10 Desember 2018 19.46.28 UTC+7, Riska Kurnianto menulis:
>
> in staging or production env, You need to specify STATIC_ROOT in 
> settings.py and run "manage.py collectstatic".
>
>
>
> On Mon, 10 Dec 2018, 10:28 pujiarahman <[email protected] <javascript:> 
> wrote:
>
>> Hi all, 
>>
>> i have instaled django in ubuntu, 
>> i have image and i put in folder (*img*), the locate is 
>>
>> blog 
>> urls.py
>> views.py
>> admin.py
>> --------------static
>> ---------------------- blog
>> -----------------------------dist
>> -----------------------------------*img*
>>
>> When i load my browser The image is fine no problem, the problem is when, 
>> i config the settings.py  to :
>>
>> DEBUG = False
>> ALLOWED_HOSTS = ['localhost', '27.0.0.1', 'xxx.xxx.xxx.xxx', '[::1]']
>>
>> the image can not found, but when i set Debug to True , the image come 
>> back normal.
>> is there any miss in my config settings.py
>>
>> this my home.html
>>
>> {% load static %}
>> <!DOCTYPE html>
>> <html>
>> <head>
>> </head>
>> <body class="hold-transition skin-blue sidebar-mini">
>> <li class="user-header">
>> <img src="{% static 'blog/dist/img/noc.jpg' %}" class="img-circle" alt="User 
>> Image">
>>
>> <p>
>> NOC
>> <small>Member since Nov. 2018</small>
>> </p>
>> </li>
>> ..............
>>
>>
>> Regards
>>
>> Sidik
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/7b30d6a2-c1e0-45fb-8722-3b38ed6fd062%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/7b30d6a2-c1e0-45fb-8722-3b38ed6fd062%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f054772-e385-4964-8749-82c316c29d16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to