It seems that my last message didn't submitted for some reason, but
whatever. I found the problem: it was the *MEDIA_ROOT*. And because of such
a noob like me.
*Correct:*
os.path.join(BASE_DIR, 'myApp/media/')
*Wrong:*
os.path.join(BASE_DIR, '/media/')
*Also correct (media is below
It should, yes. But instead hardcoding /media in your templates, use {{
MEDIA_URL }}
On 26 Jul 2015 11:57, wrote:
> Yeah, there is a test image to do the work. But I'm not using HTML
> elements to see it: I'm trying to directly see it with the URL, like when
> you open a
Yeah, there is a test image to do the work. But I'm not using HTML elements
to see it: I'm trying to directly see it with the URL, like when you open a
Twitter image in a new tab.
About the setup...
MEDIA_ROOT = os.path.join(BASE_DIR, '/media/')
MEDIA_URL = '/media/'
So
Do you save your avatar images there? Do you prepend MEDIA_URL to the
avatar's src=""? How do you display the image by the way?
These are the quick questions that came into my mind without knowing your
setup…
On 25 Jul 2015 22:59, wrote:
> Nah, I just want to have an
Nah, I just want to have an avatar inside, to get easy.
And I tried the media docs a few hours ago, but for some reason it doesn't
work. I've to set specific URL in *urls.py* of the app? (Also notice that I
use another folder inside media, but I don't think that's the problem).
El viernes, 24
MEDIA_URL is a prefix that you will put in front of the URL media files.
E.g. you set your webserver to load such files under the /media/ URL, like
www.example.com/media/my-video.webm. Using different storage backends, like
an Amazon S3 bucket, you may want to set this to the bucket's URL.
I'm doing a little app that consists of a web page were users submits their
jokes (https://github.com/RompePC/django-muro_humoristas/tree/feature). I
had finished the models (a little overview would help), but I have one
question.
I want to use an avatar field for the users: however, I don't
7 matches
Mail list logo