Problem when i turn debug False

Skip to first unread message

Sep 2, 2021, 4:45:57 AMSep 2
to Django users
Hello my web site is hosted on a2hosting
 when i turn to False the image are not loaded.

My have this line:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "static_media")

the file are located in:

In the template I do as follow
 {% load static %}

<img src="{% static "polls/gb.png" %}............

Daniel Hepper

Sep 2, 2021, 10:01:03 AMSep 2
As far as I can tell a2hosting offers plain virtual servers. Have you read the documentation on Serving static files in production?

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
To view this discussion on the web visit

Luca Bertolotti

Sep 2, 2021, 10:40:38 AMSep 2
Yes i have read the documentation but as you can see I never understand.
I think that I can use whitenoise in a2hosting, 

let me ask for a stupid question, a friend have a VNS on a different machine is possible use his machine for load static files?


Reply all
Reply to author
0 new messages