projects
/
matthijs
/
projects
/
dorestad-bookings.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tickets: Add a Bookings.__unicode__() method.
[matthijs/projects/dorestad-bookings.git]
/
tickets
/
models.py
diff --git
a/tickets/models.py
b/tickets/models.py
index 5c56b0aa82b0d99f2ef88e79215c77f43270e613..3229020872d4afd33f531b80fbaab2e7fe7cbca2 100644
(file)
--- a/
tickets/models.py
+++ b/
tickets/models.py
@@
-26,3
+26,10
@@
class Booking(models.Model):
def _get_price(self):
return self.tickets * TICKET_PRICE
price = property(_get_price)
def _get_price(self):
return self.tickets * TICKET_PRICE
price = property(_get_price)
+
+ def __unicode__(self):
+ return u'#%s: %s - %s - %s kaart%s (€ %.2d)' % (
+ self.pk, self.name,
+ self.get_show_display(),
+ self.tickets, "en" if self.tickets != 1 else "",
+ self.price)