mirror of
https://github.com/nanoy42/coope
synced 2024-11-05 17:36:28 +00:00
Change string of draft product
This commit is contained in:
parent
f715726a1e
commit
ed5b4a6fa7
2 changed files with 8 additions and 4 deletions
|
@ -98,7 +98,11 @@ class Product(models.Model):
|
|||
history = HistoricalRecords()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
if self.draft_category == self.DRAFT_NONE:
|
||||
return self.name + "(" + str(self.amount) + " €)"
|
||||
else:
|
||||
return self.name + " (" + str(self.amount) + " €, " + str(self.deg) + "°)"
|
||||
|
||||
|
||||
def user_ranking(self, pk):
|
||||
"""
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
{% if forloop.counter0|divisibleby:4 %}
|
||||
<tr style="text-align:center">
|
||||
{% endif %}
|
||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||
{% if forloop.counter|divisibleby:4 %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
@ -148,7 +148,7 @@
|
|||
{% if forloop.counter0|divisibleby:4 %}
|
||||
<tr style="text-align:center">
|
||||
{% endif %}
|
||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||
{% if forloop.counter|divisibleby:4 %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
@ -164,7 +164,7 @@
|
|||
{% if forloop.counter0|divisibleby:4 %}
|
||||
<tr style="text-align:center">
|
||||
{% endif %}
|
||||
<td><button class="menu {% if product.adherent_required %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
||||
<td><button class="menu {% if product.adherent_required %}special{% endif%}" target="{{product.pk}}">{{product}}</button></td>
|
||||
{% if forloop.counter|divisibleby:4 %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue