File: test.djhtml

package info (click to toggle)
web-mode 17.3.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,164 kB
  • sloc: lisp: 13,359; javascript: 506; jsp: 113; sh: 10; php: 9; makefile: 8; xml: 2
file content (71 lines) | stat: -rw-r--r-- 1,356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{% if something %}
{% endif %}

related issues: #293

<div>
  <!--   {% if something %} -->
  <!--   {% endif %} -->
</div>

<!--   {% if something %} -->
<!--   {% endif %} -->

{% if something %}
  {% if something2 %}{% endif %} {{  }}
{% endif %}

{% if something %} {{ }}
{% endif %}

{% for book in books|dictsort:"author.age" %}
  * {{ book.title }} ({{ book.author.name }})
{% endfor %}

{% widthratio this_value max_value max_width as width %}
{% blocktrans %}The width is: {{ width }}{% endblocktrans %}

<div>
  {{ form_widget(form.address.city, {'attr': {'class': 'form-control form-control-md'}}) }}
</div>

{% if something %}
  {% if something2 %}{% endif %}{{  }}
{% endif %}

{% block title %}{% endblock %}

Indented

<div>
  <p class="someclass
            {% if foo %}fooclass{% endif %}">
    the open control block above is inside an html attr</p>
  <div id="foo"
       {% if hidden %}style="display: none;"{% endif %}>
    <div>test</div></div>
</div>


related issues: #417

{{ athlete_list|length }}

{% for_custom_tag %}
<span>Element should not be indented</span>

{% block_custom_tag %}
<span>Element should not be indented</span>

{% non_keyword_start %}
<span>Element should not be indented</span>

<div>
  issue#466
  {% if block %}
    Content
  {% endif %}
</div>

{% trans "" %}
<span>Element should not be indented</span>