Commit 48a5061b authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

update addstat agent

parent ed9ce26e
......@@ -58,4 +58,5 @@ class appstats(models.Model):
app = models.CharField(max_length=30)
module = models.CharField(max_length=30)
ip = models.CharField(max_length=30)
agent = models.CharField(max_length=200, default='Anonymous')
lang = models.CharField(max_length=10)
......@@ -610,6 +610,7 @@ def addStat(request):
newStat.app = app
newStat.module = module
newStat.ip = get_client_ip(request)
newStat.agent = parse(request.META['HTTP_USER_AGENT'])
newStat.lang = lang
if newStat.ip!="127.0.0.1": newStat.save()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment