Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Interfaces.objects.all()
- .annotate(
- age = (datetime.utcnow() - F('timestamp')), # 0:00:08.535704
- age2 = Epoch(datetime.utcnow() - F('timestamp')), # 8.535704
- # age3 = int(Epoch(datetime.utcnow() - F('timestamp'))/300),
- current_time=Value(str(datetime.utcnow()),
- output_field=null_char_field),
- )
- .order_by('age','ip')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement