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

python, dj---html 模板语句中是什么语法? (已上代码)

  •  
  •   redhatping · May 10, 2015 · 3231 views
    This topic created in 4046 days ago, the information mentioned may be changed or developed.
    $def with (greeting)

    <html>
    <head>
    <title>Gothons Of Planet Percal #25</title>
    </head>
    <body>

    $if greeting:
    I just wanted to say <em style="color: green; font-size: 2em;">$greeting</em>.
    $else:
    <em>Hello</em>, world!

    </body>
    </html>

    $def with (greeting) 以及 $if greeting是撒语言啊?
    6 replies    2015-05-11 09:32:18 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       May 10, 2015
    模版自己的语言。
    imlonghao
        2
    imlonghao  
       May 10, 2015 via Android
    楼主你的 dj--- 是 Django 的意思么?
    我认为是模板自己的语言
    redhatping
        3
    redhatping  
    OP
       May 10, 2015 via iPhone
    打错字了,web.py,模板下
    FingerLiu
        4
    FingerLiu  
       May 11, 2015
    @imlonghao 貌似不是 django, django 里没这么神奇的语法。
    wizardoz
        5
    wizardoz  
       May 11, 2015
    我就说嘛,看这模板应该是webpy的模板。
    这个木板用的就是python的语法啊。只是在python代码加上了“$”而已。
    wizardoz
        6
    wizardoz  
       May 11, 2015
    $if greeting:

    就是python中的:
    if greeting:
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5698 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 06:36 · PVG 14:36 · LAX 23:36 · JFK 02:36
    ♥ Do have faith in what you're doing.