can't figure out serving static images in django dev environment

后端 未结 3 1196
感动是毒
感动是毒 2021-01-03 12:27

I\'ve read the article (and few others on the subject), but still can\'t figure out how to show an image unless a link to a file existing on a web-service is hard-coded into

3条回答
  •  [愿得一人]
    2021-01-03 12:30

    This looks buggy...:

    r'^galleries/(landscapes)/(?P.jpg)$'
    

    this RE will only match image names with a single character begore the jpg suffix, not four (as in, e.g., '160.jpg'). Maybe you meant...

    r'^galleries/(landscapes)/(?P.*jpg)$'
    

    ...?

提交回复
热议问题