Browse Source

Make visitor tracking more robust

pull/2/head
Noah Petherbridge 5 years ago
parent
commit
023d5f91df
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      rophako/model/tracking.py

+ 4
- 0
rophako/model/tracking.py View File

@@ -37,6 +37,8 @@ def track_visit(request, session):
db = dict(hits=0)
if JsonDB.exists(dbfile):
db = JsonDB.get(dbfile)
if db is None:
db = dict(hits=0)

# Update it?
if not cookie:
@@ -50,6 +52,8 @@ def track_visit(request, session):
db = dict()
if JsonDB.exists(dbfile):
db = JsonDB.get(dbfile)
if db is None:
db = dict()

# Update with their IP?
if not cookie and not addr in db:

Loading…
Cancel
Save