Make sure that "django.core.context_processors.media" is listed in
TEMPLATE_CONTEXT_PROCESSORS of your settings.py.
If above context processor is not listed then MEDIA_URL won't be
available in template.
Another reason for this can be that you are using render_to_response
instead of render in you
Thank you very much.
I think the problem is about printing variable. {{ MEDIA_URL }} doesn't
print anything in the template. For now, I solved the problem by using
absolute path, /media/... .
--
On Sunday, April 7, 2013 9:20:16 AM UTC+3, psjinx wrote:
>
> On Sat, Apr 6, 2013 at 4:11 PM, Fati
On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu wrote:
> MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media'
This is the absolute path to your media directory.
> MEDIA_URL = '/media/'
This means files/directories at MEDIA_ROOT directory will be
accessible at an url starting with
It doesn't work..
--
On Saturday, April 6, 2013 2:46:05 PM UTC+3, Avnesh Shakya wrote:
>
> try it..
>
> create one more folder media and put that media folder inside this new
> folder
> and then run..
>
> regards,
> Avnesh Shakya
>
> On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu
>
> > wr
try it..
create one more folder media and put that media folder inside this new
folder
and then run..
regards,
Avnesh Shakya
On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu wrote:
> I want to render an image via a template, but the template can't show
> image, but only a small image symbol..
I want to render an image via a template, but the template can't show
image, but only a small image symbol..
My settings:
MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media'
MEDIA_URL = '/media/'
STATIC_ROOT = ' '
STATIC_URL = '/unnamed/'
I have a template in
'/home/mehmet/inte
And in the settings:
MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media'
MEDIA_URL = '/media/'
STATIC_ROOT = ' '
STATIC_URL = '/static/'
I have a template in
'/home/mehmet/internet_projeleri/site4ust/site4/templatelerim', which has
the following line:
http://groups.google.com/
7 matches
Mail list logo