Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:57:40+00:00 2026-06-11T09:57:40+00:00

I simply don’t know how to do it. I have an html linked with

  • 0

I simply don’t know how to do it.

I have an html linked with a knew url, with two buttons.
imagine that url is only shared with two persons/users.

each person have to push the button signed their name.

I tried using request, but I couldn’t figure out how to know if more than one user is active in that view.

The another point is:

One person reach the url first, how to make an “refresh” in their browser, when the second one appear?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:57:42+00:00Added an answer on June 11, 2026 at 9:57 am

    You’d have to store who’s at what view in some model.

    class UsersInURL(models.Model):
        users = models.ManyToManyField(User)
        url = models.CharField()
        # you'd probably want to use a through table and set up some expiration logic
    

    Then remember to modify this model every time a logged in user views a page; middleware sounds perfect for this.

    class UserTrackerMiddleware(object):
        def process_view(self, request, *args, **kwargs):
              UsersInURL.users.through.filter(user=request.user).delete()
              users_in_url, created = UsersInURL.objects.get_or_create(url=request.path)
              users_in_url.users.add(request.user)
    

    Then to refresh their page, you’d need to set some kind of communication between the server and the browser which pings this model and refreshes if it detects some change.

    var lastCheckedUsers = undefined;
    function checkForNewUsers() {
        $.get('/some-ajaxy-url/', { url: document.URL }, success: function(data) {
             // you'd have to set up a view that returns active users @ url
             if (lastCheckedUsers != data.users && lastCheckedUsers != undefined) {
                window.location.href = window.location.href; 
             };
            lastCheckedUsers = data.users;  // store last state; refresh if modified. 
        })
    };
    setInterval(checkForNewUsers, 1000);
    

    I’m sure that should get some ideas flowing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very weird thing to do and simply don't know how. This
I checked all the topics, but i simply don't know why my script does
I don't know what I'm not doing but I simply cannot get my own
I'm resizing a window with MoveWindow() but I don't own that window. I simply
The JAXB documentation is like a text-book, and I simply don't have to time
This is a very newbie kind of ASP.NET question: I simply don't know and
I'm either a bit overwhelmed by the complexity of NSDate or I simply don't
simple logic here, I don't know how I can separate the value from a
It is a simple question but I don't know how to do it because
This is a simple question but I don't know how to construct a variable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.