Try this one:
http://www.djangoproject.com/documentation/db-api/#get-foo-filename
To retrieve a image or file absolute url simply use:
{{ object.get_myImageObject_url }}
Absolute URL is compiled according to settings.py definition of
MEDIA_URL and therefore changes automatically at deployment.
Me too, I can't get this to work and it's driving me crazy. My main
problem seems to be that Django is looking inside the Django site
package within my Python framework for the media (when I try to load
an image directly, for instance, it tells me "Page not found: /Library/
Frameworks/Python.frame
Tim Chase wrote:
>> Thanks. Yes, using relative paths is the right idea - it's a shame that
>> the base url's have to be hard coded in the templates. I understand
>> from a web efficiency standpoint of Django not handling static content
>> but from an application development standpoint this i
> Thanks. Yes, using relative paths is the right idea - it's a shame that
> the base url's have to be hard coded in the templates. I understand
> from a web efficiency standpoint of Django not handling static content
> but from an application development standpoint this is a real complexity
cjl wrote:
> John:
>
> I've added a section at the end of the first chapter of my tutorial
> that describes how to serve static content with the Django development
> server, which seems to be a frequently asked question. See:
>
> http://www.instantdjango.com/chapter1.html
>
> Check it out, and le
John:
I've added a section at the end of the first chapter of my tutorial
that describes how to serve static content with the Django development
server, which seems to be a frequently asked question. See:
http://www.instantdjango.com/chapter1.html
Check it out, and let me know if you have any
http://www.djangoproject.com/documentation/static_files/
You need to add information about your media directory to the url.py
On Oct 5, 5:59 pm, staff-gmail <[EMAIL PROTECTED]> wrote:
> I have read the docs on static files but cannot figure out how to
> specify an image when using the built-in we
I have read the docs on static files but cannot figure out how to
specify an image when using the built-in web server.
If I have my media location:
/myproject/myapp/media/picture1.png
if I have a template file
/myproject/myapp/templates/mypage.html
if I try :
I get nothing. In fact I've t
8 matches
Mail list logo