You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I make a project with multiple domain and only one ip address. How can i get hit count information from one domain and another.
May be we need additional field to model Hit, something like this :
class Hit(models.Model):
created = models.DateTimeField(editable=False, auto_now_add=True,
db_index=True)
ip = models.CharField(max_length=40, editable=False, db_index=True)
session = models.CharField(max_length=40, editable=False, db_index=True)
user_agent = models.CharField(max_length=255, editable=False)
user = models.ForeignKey(AUTH_USER_MODEL, null=True, editable=False,
on_delete=models.CASCADE)
hitcount = models.ForeignKey(MODEL_HITCOUNT, editable=False, on_delete=
models.CASCADE)
# Additional Field
domain = models.CharField(max_length=255, editable=False, default='')
And domain can be save using :
domain=request.get_host()
The text was updated successfully, but these errors were encountered:
I make a project with multiple domain and only one ip address. How can i get hit count information from one domain and another.
May be we need additional field to model Hit, something like this :
And domain can be save using :
The text was updated successfully, but these errors were encountered: