예제 #1
0
파일: models.py 프로젝트: gimler/techism2
 def update_archived_flag(self):
     "Updates the 'Archived' flag, depending if the the end date is set or not"
     utc = utils.localize_to_utc(datetime.utcnow())
     if self.get_date_time_end_utc():
         self.archived = self.get_date_time_end_utc() < utc
     else:   
         self.archived = self.get_date_time_begin_utc() + timedelta(hours=1) < utc
예제 #2
0
파일: models.py 프로젝트: gimler/techism2
 def get_date_time_end_utc(self):
     "Gets the 'End' date/time in UTC."
     return utils.localize_to_utc(self.date_time_end);
예제 #3
0
파일: models.py 프로젝트: gimler/techism2
 def get_date_time_modified_utc(self):
     "Gets the 'Modifed' date/time in UTC."
     return utils.localize_to_utc(self.date_time_modified);
예제 #4
0
파일: models.py 프로젝트: gimler/techism2
 def get_date_time_begin_utc(self):
     "Gets the 'Begin' date/time in UTC."
     return utils.localize_to_utc(self.date_time_begin);
예제 #5
0
파일: models.py 프로젝트: gimler/techism2
 def get_date_time_created_utc(self):
     "Gets the 'Created' date/time in UTC."
     return utils.localize_to_utc(self.date_time_created);