Re: static images with built-in django server

2007-11-05 Thread maco
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.

Re: static images with built-in django server

2007-10-25 Thread girzel
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

Re: static images with built-in django server

2007-10-06 Thread staff-gmail
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

Re: static images with built-in django server

2007-10-06 Thread Tim Chase
> 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

Re: static images with built-in django server

2007-10-06 Thread staff-gmail
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

Re: static images with built-in django server

2007-10-06 Thread cjl
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

Re: static images with built-in django server

2007-10-06 Thread AndrewK
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

static images with built-in django server

2007-10-05 Thread staff-gmail
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