As far as I can tell a2hosting offers plain virtual servers. Have you read
the documentation on Serving static files in production?

https://docs.djangoproject.com/en/3.2/howto/static-files/deployment/


On Thu, Sep 2, 2021 at 10:46 AM luca72.b...@gmail.com <
luca72.bertolo...@gmail.com> wrote:

> Hello my web site is hosted on a2hosting
>  when i turn to False the image are not loaded.
>
> My settings.py 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:
> home/aaaa//myapp/static_files/polls
>
> In the template I do as follow
>  {% load static %}
>
> <img src="{% static "polls/gb.png" %}............
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/836ae997-cc6d-4d47-be45-fed85df79ab9n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/836ae997-cc6d-4d47-be45-fed85df79ab9n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHEnUVUjDmq3rEdw7nhnGwbxoxbRsSt6TDuxKF1MBhS97mUaXw%40mail.gmail.com.

Reply via email to