you can put {{MEDIA_URL}}

but while displaying instead of displaying it directly  just do the
below

from django.template.loader import render_to_string
from django.template import Context, Template

t = Template("flat page content goes here")
newflatpage = t.render({},context_instance=RequestContext(request))
#above is the new flat page where media url are replaced by their
corresponding urls



subject = render_to_string('',{},RequestContext(request))



On Jun 25, 12:53 pm, Panu Tangchalermkul <pan...@gmail.com> wrote:
> In the content of my flatpage, there's a picture to be displayed that
> it was stored in django media folder. I want to link to this file
> without having to specify its url directly. Instead, I want to use
> something like {{MEDIA_URL}} when editing the content via django-
> admin. I know I can use it normally on flatpage template but how about
> on the content?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to