Re: Model opinnions

2015-07-27 Thread durirompepc
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

Re: Model opinnions

2015-07-26 Thread Gergely Polonkai
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

Re: Model opinnions

2015-07-26 Thread durirompepc
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

Re: Model opinnions

2015-07-25 Thread Gergely Polonkai
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

Re: Model opinnions

2015-07-25 Thread durirompepc
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

Re: Model opinnions

2015-07-25 Thread Gergely Polonkai
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.

Model opinnions

2015-07-24 Thread durirompepc
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