DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
darasion

换用 django 1.2 时出现另外一个头疼的问题:{% spaceless %} 标签把行内元素中的空格也都去掉了。

  •  
  •   darasion · Mar 11, 2011 · 5579 views
    This topic created in 5611 days ago, the information mentioned may be changed or developed.
    {% spaceless %} 标签在不同的版本中有不同的行为。

    在 django 0.96 中的行为:
    去掉所有空白符号,html元素间留一个空格。

    在 django 1.2 中的行为:
    去掉所有空白符号,html元素间什么都不留。

    但是行内元素,比如链接。会挤在一块,
    举例:
    <a href="xxx">A</a> <a href="">B</a>

    本应显示为:
    A B
    结果显示成:
    AB
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5389 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:17 · PVG 16:17 · LAX 01:17 · JFK 04:17
    ♥ Do have faith in what you're doing.