Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テンプレートをdjango1.2でレンダリングし、文字列を表示すると
<br />
私が得るタグ
<br />
代わりは?
意味私は実際にテキストを見る
非常に望ましい改行を取得する代わりに。
{{ string }}表記法を使用して変数から文字列を出力することを意味していると思います。出力している文字列が安全であることがわかっている場合は、|safeフィルターを使用してください。
{{ string }}
|safe
{{ string|safe }}
適切な検査なしにユーザーから提供されたデータでこれを行うことはお勧めしません。
Djangoドキュメント