V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 2691 views
    This topic created in 2414 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  
    PRO
       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   ·   Solana   ·   3295 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:26 · PVG 21:26 · LAX 06:26 · JFK 09:26
    ♥ Do have faith in what you're doing.