Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/d/j/django_hits-0.2.0-2/django_hits/utils.py   django_hits(Download)
from .models import Hit, HitHistory
 
def create_hit_history(hit):
    try:
        last_history = hit.history.order_by('-when', '-pk')[0]
    except IndexError:
        last_history = HitHistory(hit=hit)  # empty history, not stored (only used for calculation below)
    history = HitHistory(
        hit=hit,