foo
This commit is contained in:
parent
3dc562f3c2
commit
c7dcd5343f
|
@ -86,6 +86,14 @@ class Good(models.Model):
|
|||
weight = models.IntegerField(max_length=20, null=True)
|
||||
value = models.IntegerField(max_length=20, null=True)
|
||||
|
||||
def get_description(self):
|
||||
if description_string_trans != '':
|
||||
return self.description_string_trans
|
||||
if description_string != '':
|
||||
return self.description_string
|
||||
else:
|
||||
return self.description
|
||||
|
||||
def __unicode__(self):
|
||||
return self.description
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ No of results: {{ no_of_results }} displaying page {{ page }} of {{ no_of
|
|||
<table class="goodTable">
|
||||
{% for good in s.good_set.all %}
|
||||
<tr>
|
||||
<td>{{ good.description_string_trans }}</td>
|
||||
<td>{{ good.get_description }}</td>
|
||||
<td>{{ good.no_of_packages }}</td>
|
||||
<td>{{ good.weight }}</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue
Block a user