我有一个这样的模型:
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
如何获取时间间隔,然后根据该值求和?
答案 0 :(得分:3)
var searchHash = $text.val();
searchHash = searchHash.replace(/\s/g, '');
答案 1 :(得分:0)
请查看下一个链接: