djangohitcounter

Count every hit with django-hitcount


Is there a way to make Django hitcount module count every hit? Currently, it counts once for a single IP but I want it to every hit. How can I achieve this?


Solution

  • I solved this by adding a default setting in settings.py my file.

    In my settings.py file, I added the below code

    # hitcount settings
    HITCOUNT_KEEP_HIT_ACTIVE = { 'seconds': 2 }
    

    So with this, a hit is kept active for 2 seconds and after this time period, a new hit can be recorded for a user