Skip to main content

Pretty simple hit counter for Django ORM objects

Project description


Pretty simple hit counter for Django ORM objects. It collects hits for any django model objects per date.


  • Python 2 & 3
  • Django 1.7+


  1. Install it using pip (coming soon):
pip install djangohitcounter

or add django_hitcounter to your Python path

  1. Add the django_hitcounter app to your INSTALLED_APPS:


Usage is pretty simple too.

from django_hitcounter.models import Counter
from datetime import datetime, timedelta

obj = SomeModel.objects.get(pk=1)  # get some django object

Counter.hit(obj)  # register hit
Counter.hit(obj, amount=2)  # register 2 hits
Counter.hit(obj, - timedelta(days=1))  # register hit on yesterday date

Counter.objects.for_model(obj)  # get all counter records for our object
Counter.objects.for_model(obj, total=True)  # get total hits count for object


This software is distributed under the Apache License Version 2.0

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for djangohitcounter, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size djangohitcounter-0.2.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page