Skip to content

Commit ba0df78

Browse files
committed
Replaces linebreaks with linebreaksbr to remove double <p> [Fixes DjangoGirls#776]
1 parent e1d22ba commit ba0df78

70 files changed

Lines changed: 169 additions & 169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cs/css/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Soubor by měl nyní vypadat takto:
127127
<div>
128128
<p>published: {{ post.published_date }}</p>
129129
<h1><a href="">{{ post.title }}</a></h1>
130-
<p>{{ post.text|linebreaks }}</p>
130+
<p>{{ post.text|linebreaksbr }}</p>
131131
</div>
132132
{% endfor %}
133133
</body>
@@ -193,7 +193,7 @@ A nyní přidej třídu, `post` do svého `div` obsahující blog post.
193193
<div class="post">
194194
<p>published: {{ post.published_date }}</p>
195195
<h1><a href="">{{ post.title }}</a></h1>
196-
<p>{{ post.text|linebreaks }}</p>
196+
<p>{{ post.text|linebreaksbr }}</p>
197197
</div>
198198
```
199199

@@ -256,7 +256,7 @@ Pak obklopující HTML kód, který zobrazuje příspěvek s deklaracemi tříd.
256256
<div class="post">
257257
<p>published: {{ post.published_date }}</p>
258258
<h1><a href="">{{ post.title }}</a></h1>
259-
<p>{{ post.text|linebreaks }}</p>
259+
<p>{{ post.text|linebreaksbr }}</p>
260260
</div>
261261
{% endfor %}
262262
```
@@ -273,7 +273,7 @@ v `blog/templates/blog/post_list.html` tímto:
273273
{{ post.published_date }}
274274
</div>
275275
<h1><a href="">{{ post.title }}</a></h1>
276-
<p>{{ post.text|linebreaks }}</p>
276+
<p>{{ post.text|linebreaksbr }}</p>
277277
</div>
278278
{% endfor %}
279279
</div>

cs/django_forms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ tak, aby šablona vypadala takto:
280280
{% endif %}
281281
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}"><span class="glyphicon glyphicon-pencil"></span></a>
282282
<h1>{{ post.title }}</h1>
283-
<p>{{ post.text|linebreaks }}</p>
283+
<p>{{ post.text|linebreaksbr }}</p>
284284
</div>
285285
{% endblock %}
286286
```

cs/django_templates/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Funguje to! Ale chceme, aby se zobrazovaly jako ty statické příspěvky, kter
5555
<div>
5656
<p>published: {{ post.published_date }}</p>
5757
<h1><a href="">{{ post.title }}</a></h1>
58-
<p>{{ post.text|linebreaks }}</p>
58+
<p>{{ post.text|linebreaksbr }}</p>
5959
</div>
6060
{% endfor %}
6161
```
@@ -66,7 +66,7 @@ Funguje to! Ale chceme, aby se zobrazovaly jako ty statické příspěvky, kter
6666

6767
[3]: images/step3.png
6868

69-
Všimla sis, že jsme tentokrát použili lehce rozdílnou notaci (`{{ post.title }}` nebo `{{ post.text }}`)? Přistupujeme k datům v každém poli defnovaném v našem `Post` modelu. Dále `|linebreaks` posílá text příspěvku filterem, aby konvertoval zalomení řádků na paragrafy.
69+
Všimla sis, že jsme tentokrát použili lehce rozdílnou notaci (`{{ post.title }}` nebo `{{ post.text }}`)? Přistupujeme k datům v každém poli defnovaném v našem `Post` modelu. Dále `|linebreaksbr` posílá text příspěvku filterem, aby konvertoval zalomení řádků na paragrafy.
7070

7171
## Ještě jedna věc
7272

cs/extend_your_application/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Začneme s přidáním odkazu do `blog/templates/blog/post_list.html` souboru. Z
2222
{{ post.published_date }}
2323
</div>
2424
<h1><a href="">{{ post.title }}</a></h1>
25-
<p>{{ post.text|linebreaks }}</p>
25+
<p>{{ post.text|linebreaksbr }}</p>
2626
</div>
2727
{% endfor %}
2828
{% endblock content %}
@@ -148,7 +148,7 @@ Celý příkaz bude vypadat takto:
148148
</div>
149149
{% endif %}
150150
<h1>{{ post.title }}</h1>
151-
<p>{{ post.text|linebreaks }}</p>
151+
<p>{{ post.text|linebreaksbr }}</p>
152152
</div>
153153
{% endblock %}
154154
```

cs/template_extending/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Pak jej otevři a zkopírujte vše z `post_list.html` do `base.html` souboru, ja
4343
{{ post.published_date }}
4444
</div>
4545
<h1><a href="">{{ post.title }}</a></h1>
46-
<p>{{ post.text|linebreaks }}</p>
46+
<p>{{ post.text|linebreaksbr }}</p>
4747
</div>
4848
{% endfor %}
4949
</div>
@@ -89,7 +89,7 @@ Nyní ulož a znovu otevři svůj `blog/templates/blog/post_list.html`. Odstraň
8989
{{ post.published_date }}
9090
</div>
9191
<h1><a href="">{{ post.title }}</a></h1>
92-
<p>{{ post.text|linebreaks }}</p>
92+
<p>{{ post.text|linebreaksbr }}</p>
9393
</div>
9494
{% endfor %}
9595
```
@@ -112,7 +112,7 @@ A teď přidej na začátek souboru tento řádek:
112112
{{ post.published_date }}
113113
</div>
114114
<h1><a href="">{{ post.title }}</a></h1>
115-
<p>{{ post.text|linebreaks }}</p>
115+
<p>{{ post.text|linebreaksbr }}</p>
116116
</div>
117117
{% endfor %}
118118
{% endblock content %}

en/css/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Your file should now look like this:
123123
<div>
124124
<p>published: {{ post.published_date }}</p>
125125
<h1><a href="">{{ post.title }}</a></h1>
126-
<p>{{ post.text|linebreaks }}</p>
126+
<p>{{ post.text|linebreaksbr }}</p>
127127
</div>
128128
{% endfor %}
129129
</body>
@@ -184,7 +184,7 @@ And now add a class `post` to your `div` containing a blog post.
184184
<div class="post">
185185
<p>published: {{ post.published_date }}</p>
186186
<h1><a href="">{{ post.title }}</a></h1>
187-
<p>{{ post.text|linebreaks }}</p>
187+
<p>{{ post.text|linebreaksbr }}</p>
188188
</div>
189189
```
190190

@@ -246,7 +246,7 @@ Then surround the HTML code which displays the posts with declarations of classe
246246
<div class="post">
247247
<p>published: {{ post.published_date }}</p>
248248
<h1><a href="">{{ post.title }}</a></h1>
249-
<p>{{ post.text|linebreaks }}</p>
249+
<p>{{ post.text|linebreaksbr }}</p>
250250
</div>
251251
{% endfor %}
252252
```
@@ -263,7 +263,7 @@ in the `blog/templates/blog/post_list.html` with this:
263263
<p>published: {{ post.published_date }}</p>
264264
</div>
265265
<h1><a href="">{{ post.title }}</a></h1>
266-
<p>{{ post.text|linebreaks }}</p>
266+
<p>{{ post.text|linebreaksbr }}</p>
267267
</div>
268268
{% endfor %}
269269
</div>

en/django_forms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ so that the template will look like:
275275
{% endif %}
276276
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}"><span class="glyphicon glyphicon-pencil"></span></a>
277277
<h1>{{ post.title }}</h1>
278-
<p>{{ post.text|linebreaks }}</p>
278+
<p>{{ post.text|linebreaksbr }}</p>
279279
</div>
280280
{% endblock %}
281281
```

en/django_templates/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ It works! But we want them to be displayed like the static posts we created earl
4949
<div>
5050
<p>published: {{ post.published_date }}</p>
5151
<h1><a href="">{{ post.title }}</a></h1>
52-
<p>{{ post.text|linebreaks }}</p>
52+
<p>{{ post.text|linebreaksbr }}</p>
5353
</div>
5454
{% endfor %}
5555
```
@@ -58,7 +58,7 @@ It works! But we want them to be displayed like the static posts we created earl
5858

5959
![Figure 13.3](images/step3.png)
6060

61-
Have you noticed that we used a slightly different notation this time `{{ post.title }}` or `{{ post.text }}`? We are accessing data in each of the fields defined in our `Post` model. Also the `|linebreaks` is piping the posts' text through a filter to convert line-breaks into paragraphs.
61+
Have you noticed that we used a slightly different notation this time `{{ post.title }}` or `{{ post.text }}`? We are accessing data in each of the fields defined in our `Post` model. Also the `|linebreaksbr` is piping the posts' text through a filter to convert line-breaks into paragraphs.
6262

6363

6464
## One more thing

en/extend_your_application/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ We will start with adding a link inside `blog/templates/blog/post_list.html` fil
2121
{{ post.published_date }}
2222
</div>
2323
<h1><a href="">{{ post.title }}</a></h1>
24-
<p>{{ post.text|linebreaks }}</p>
24+
<p>{{ post.text|linebreaksbr }}</p>
2525
</div>
2626
{% endfor %}
2727
{% endblock content %}
@@ -138,7 +138,7 @@ It will look like this:
138138
</div>
139139
{% endif %}
140140
<h1>{{ post.title }}</h1>
141-
<p>{{ post.text|linebreaks }}</p>
141+
<p>{{ post.text|linebreaksbr }}</p>
142142
</div>
143143
{% endblock %}
144144
```

en/template_extending/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Then open it up and copy everything from `post_list.html` to `base.html` file, l
4242
{{ post.published_date }}
4343
</div>
4444
<h1><a href="">{{ post.title }}</a></h1>
45-
<p>{{ post.text|linebreaks }}</p>
45+
<p>{{ post.text|linebreaksbr }}</p>
4646
</div>
4747
{% endfor %}
4848
</div>
@@ -88,7 +88,7 @@ Now save `base.html`, and open your `blog/templates/blog/post_list.html` again.
8888
{{ post.published_date }}
8989
</div>
9090
<h1><a href="">{{ post.title }}</a></h1>
91-
<p>{{ post.text|linebreaks }}</p>
91+
<p>{{ post.text|linebreaksbr }}</p>
9292
</div>
9393
{% endfor %}
9494
```
@@ -107,7 +107,7 @@ Time to add block tags to this file!
107107
{{ post.published_date }}
108108
</div>
109109
<h1><a href="">{{ post.title }}</a></h1>
110-
<p>{{ post.text|linebreaks }}</p>
110+
<p>{{ post.text|linebreaksbr }}</p>
111111
</div>
112112
{% endfor %}
113113
{% endblock %}
@@ -123,7 +123,7 @@ Only one thing left. We need to connect these two templates together. This is w
123123
{{ post.published_date }}
124124
</div>
125125
<h1><a href="">{{ post.title }}</a></h1>
126-
<p>{{ post.text|linebreaks }}</p>
126+
<p>{{ post.text|linebreaksbr }}</p>
127127
</div>
128128
{% endfor %}
129129
{% endblock %}

0 commit comments

Comments
 (0)