views:

167

answers:

1

How the heck do i serve a simple img without all that MediaGenerator nonsense, in Django on App Engine? I am using app engine patch.

I got layout like this:

  • django_app_engine_project_folder
    • my_app

Where should my folder for my media be? In my_app? Or do I put everything in the top media folder?

I want to do something like this in my HTML template...

<img src="/site_media/my_image.jpg" />

Note that /media prefix is already beign used for admin media.

+2  A: 

Well it seems that using app.yaml works out:

- url: /my_app/media/
  static_dir: my_app/media

Which allows me to refer to image a.jpg in folder my_app/media with a url like:

<img src="/my_app/media/a.jpg" />
drozzy