我有这样一个模型:
class MyModel(Model):
pub_date = DateTimeField(auto_now_add=True)
hours = IntergerField()
def get_weekly_hours(self)
# Find a week-ago interval based on the pub_date
# Then based on the interval found above, aggregate the...
# Sum the `hours` altogether
pass
如何获取时间间隔,然后在此基础上求和?你知道吗
请检查下一个链接:
相关问题 更多 >
编程相关推荐