forked from DGNum/gestioCOF
Grod commit dégueux avec une tonne de trucs. Berk.
This commit is contained in:
parent
d5b3d3f958
commit
64b8ee4133
17 changed files with 536 additions and 209 deletions
|
@ -1,5 +1,7 @@
|
|||
# coding: utf-8
|
||||
|
||||
import calendar
|
||||
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -29,11 +31,14 @@ class Spectacle (models.Model):
|
|||
def __repr__ (self):
|
||||
return u"[%s]" % self.__unicode__()
|
||||
|
||||
def timestamp(self):
|
||||
return "%d" % calendar.timegm(self.date.utctimetuple())
|
||||
|
||||
def date_no_seconds(self):
|
||||
return self.date.strftime('%d %b %Y %H:%M')
|
||||
|
||||
def __unicode__ (self):
|
||||
return u"%s - %s @ %s, %.02f€" % (self.title, self.date_no_seconds(), self.location, self.price)
|
||||
return u"%s - %s, %s, %.02f€" % (self.title, self.date_no_seconds(), self.location, self.price)
|
||||
|
||||
PAYMENT_TYPES = (
|
||||
("cash",u"Cash"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue