Re: show an image in django

2013-01-12 Thread jianhui chen
Really thanks your help. Finally, I find the problem is not in django settings, but in google engine settings. By trying many methods, my problem problem is solved by this way. add - url: /static static_dir: static #my static folder is in the root of the project expiration: '0' to app.yaml. a

Re: show an image in django

2013-01-10 Thread @jeffblack360
I think your configuration should allow you to hit your image from your browser via the following link: http://localhost:8000/static/images/gauge_example.jpg If that works change your replace {{STATIC_URL}} with '/static/'... On Tuesday, January 8, 2013 8:41:55 AM UTC-6, jianhui chen wrote: >

Re: show an image in django

2013-01-10 Thread Mario Gudelj
Have you tried removing {{ STATIC_URL }} and replacing it with a slash (/)? Or try appending the slash to the end of "E:/code/python/djangoBook/django-testapp-develop/static" in STATICFILES_DIRS. You can also add DJANGO_ROOT = dirname(dirname(abspath(__file__))) to the top of your settings.py and

Re: show an image in django

2013-01-09 Thread jianhui chen
My setting.py is: # Initialize App Engine and import the default settings (DB backend, etc.). # If you want to use a different backend you have to remove all occurences # of "djangoappengine" from this file. from djangoappengine.settings_base import * import os # Activate django-dbindexer for the

Re: show an image in django

2013-01-08 Thread Mario Gudelj
Try removing .. from the path. Also make sure your static path is set correctly in settings.py On 9 Jan, 2013 1:42 AM, "jianhui chen" wrote: > Hi all, > I want to show an image in project in which the folder DIR looks like this: > images/a.jpg > templates/introduction.html > > In introduction.htm

show an image in django

2013-01-08 Thread jianhui chen
Hi all, I want to show an image in project in which the folder DIR looks like this: images/a.jpg templates/introduction.html In introduction.html I use It can show image correctly when I open the "introduction.html" directly using firefox, but it shows ""GET /images/gauge_example.jpg HTTP/1.1" 4