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.
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" />
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论