use |linebreaks templatefilter

This commit is contained in:
Thomas Steen Rasmussen 2016-07-12 23:32:05 +02:00
parent 1ff887ca82
commit 1b1c0a8065
2 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ class CustomOrder(CreatedUpdatedModel):
) )
customer = models.TextField( customer = models.TextField(
help_text=_('The customer info for this order, use <br> for newlines') help_text=_('The customer info for this order')
) )
amount = models.IntegerField( amount = models.IntegerField(

View file

@ -8,13 +8,13 @@
<td> <td>
<h3> <h3>
{{ invoice.created|date:"b jS, Y" }}<br> {{ invoice.created|date:"b jS, Y" }}<br>
Order CU#{{ invoice.customorder.pk }}<br> Custom Order #{{ invoice.customorder.pk }}<br>
Invoice #{{ invoice.pk }} Invoice #{{ invoice.pk }}
</h3> </h3>
</td> </td>
</tr> </tr>
</table> </table>
<h3>Customer: {{ invoice.customorder.customer }}</h3> <h3>Customer: {{ invoice.customorder.customer|linebreaks }}</h3>
<br> <br>
<h2>INVOICE</h2> <h2>INVOICE</h2>
<table style="width:90%; margin:1em;"> <table style="width:90%; margin:1em;">
@ -25,7 +25,7 @@
<b>Price <b>Price
<tr> <tr>
<td> <td>
{{ invoice.customorder.text }} {{ invoice.customorder.text|linebreaks }}
<td align="right"> <td align="right">
{{ invoice.customorder.amount|currency }} {{ invoice.customorder.amount|currency }}