git.ithinksw.org
/
philo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bb81b7
)
Modified the get_start and get_end methods to return datetimes if times are specified.
author
Harris Lapiroff
<hlapirof@oberlin.edu>
Tue, 5 Apr 2011 16:53:27 +0000
(12:53 -0400)
committer
Harris Lapiroff
<hlapirof@oberlin.edu>
Tue, 5 Apr 2011 16:53:27 +0000
(12:53 -0400)
contrib/julian/models.py
patch
|
blob
|
history
diff --git
a/contrib/julian/models.py
b/contrib/julian/models.py
index
333bcb3
..
c1682cc
100644
(file)
--- a/
contrib/julian/models.py
+++ b/
contrib/julian/models.py
@@
-65,10
+65,10
@@
class TimedModel(models.Model):
raise ValidationError("A %s cannot end before it starts." % self.__class__.__name__)
def get_start(self):
- return self.start_date
+ return
datetime.datetime.combine(self.start_date, self.start_time) if self.start_time else
self.start_date
def get_end(self):
- return self.end_date
+ return
datetime.datetime.combine(self.end_date, self.end_time) if self.end_time else
self.end_date
class Meta:
abstract = True