推荐学习书目
› 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
wljtojlw
V2EX  ›  Python

django block

  •  
  •   wljtojlw · Sep 18, 2019 · 3021 views
    This topic created in 2590 days ago, the information mentioned may be changed or developed.
    {%block name %} block 定义的名字可以用变量吗 好像只接收一个参数,写出{%block {{each.site}}%} 运行也会报错
    3 replies  •  2019-09-18 20:00:38 +08:00
    SingeeKing
        1
    SingeeKing  
       Sep 18, 2019
    不能用变量
    wljtojlw
        2
    wljtojlw  
    OP
       Sep 18, 2019
    @SingeeKing 之前有找到这篇文章 好像和我一样的问题 http://www.it1352.com/641811.html
    encro
        3
    encro  
       Sep 18, 2019
    感觉你需要 if else 和子模板功能。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3335 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 13:12 · PVG 21:12 · LAX 06:12 · JFK 09:12
    ♥ Do have faith in what you're doing.