Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for project with multiple Site ID #121

Open
Ione03 opened this issue Mar 23, 2022 · 0 comments
Open

Support for project with multiple Site ID #121

Ione03 opened this issue Mar 23, 2022 · 0 comments

Comments

@Ione03
Copy link

Ione03 commented Mar 23, 2022

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant