推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Wallace007
V2EX  ›  Python

请问如何将文章和里面的图片一起展示出来呢

  •  
  •   Wallace007 · May 6, 2019 · 3113 views
    This topic created in 2698 days ago, the information mentioned may be changed or developed.

    请问如何将文章和里面的图片一起展示出来呢,思路是什么,文章我存储在了数据库,图片在文件夹里存储. 我想的是 给文章添加个对应的图片字段,存储图片的路径,但是图片在文章的哪部分显示不知道该怎么搞

    6 replies  •  2019-05-07 10:13:54 +08:00
    sevenQu
        1
    sevenQu  
       May 6, 2019
    文章要么是 markdown 格式,要么是富文本格式。图片上传后,返回 url,将 url 放入文章,类似网页链接,这样就可以了
    Wallace007
        2
    Wallace007  
    OP
       May 6, 2019
    @sevenQu 我决定收回我发的帖子,图片上传后会以 html 标签的形式和文章一起保存在数据库里 所以这个问题根本不存在
    Wallace007
        3
    Wallace007  
    OP
       May 6, 2019
    为什么我不能把帖子删掉 路过的就当没看见好了
    gao2008ss
        4
    gao2008ss  
       May 6, 2019 via Android
    怎能没看到
    cominghome
        5
    cominghome  
       May 7, 2019
    都有犯傻的时候,2333
    wb500
        6
    wb500  
       May 7, 2019
    23333
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3738 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:10 · PVG 08:10 · LAX 17:10 · JFK 20:10
    ♥ Do have faith in what you're doing.