Sammy
Sammy

Reputation: 321

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?

Upvotes: 1

Views: 339

Answers (2)

Sammy
Sammy

Reputation: 321

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

Upvotes: 0

Paul
Paul

Reputation: 74

You might want to check that this setting is set to default value.

Upvotes: 1

Related Questions