problem to show image

29 views
Skip to first unread message

luca72.b...@gmail.com

unread,
Feb 11, 2021, 9:27:51 AM2/11/21
to Django users
Hello
In the setup file i have:

STATIC_URL = '/static/'
MEDIA_URL = '/media/'

#STATICFILES_DIRS = [
#    os.path.join(BASE_DIR, "static"),
#    '/polls/static/polls',
#]

STATIC_ROOT = "F:/aflbmanager/mysite/polls/static"
MEDIA_ROOT = "F:/aflbmanager/mysite/polls/media"

In the template for load file that are in static file i use:
{% load static %}
than  for load the file :
<link rel="stylesheet" href="{% static "bese.css" %}">
and it works

How i can load image stored in media/img
<img src=????????

luca72.b...@gmail.com

unread,
Feb 11, 2021, 9:36:10 AM2/11/21
to Django users
Solved 
i have add
<img src="/media/img/myfile"   alt="my file">

Joseph Mulingwa Kithome

unread,
Feb 11, 2021, 10:34:06 AM2/11/21
to django...@googlegroups.com
Hello, I want to override the default  email that is set on Django settings and instead append my own email how do I do that

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/669fe9d3-9bd8-412d-8e2b-0efa3435c5a7n%40googlegroups.com.

Kasper Laudrup

unread,
Feb 11, 2021, 12:04:39 PM2/11/21
to django...@googlegroups.com
On 11/02/2021 16.32, Joseph Mulingwa Kithome wrote:
> Hello, I want to override the default  email that is set on Django
> settings and instead append my own email how do I do that
>

First of all, learn how to use mailing lists and/or google groups. You
shouldn't just "highjack" unrelated threads like you just did. Instead
start your own:

https://support.google.com/groups/answer/1046523?hl=en#

Then, get comfortable reading the Django documentation. It's really
quite good. I guess the setting you're looking for is this one:

https://docs.djangoproject.com/en/3.1/ref/settings/#admins

If that's not the answer you're looking for, you should probably try to
be a bit more specific when asking questions.

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages