How to open a modal when moving a page

The currently implemented code shows the modal when clicking the button. However, I would like the modal to be displayed when moving to the main page after logging in. (using Django)

JavaScript’s window.open is not what I want because it prints a new window. I want the modal window to be displayed automatically when the main page is reached upon successful login. Is there a way?

[index.html]

<div class="modal fade" id="quality" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
  <div class="modal-content">
    <div class="modal-header">
      <h5 class="modal-title">Quality</h5>
      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
    </div>
    <div class="modal-body row">
      <div class="col-sm-12">
        {% include 'pages/quality_POPUP.html' %}
      </div>
    </div>
  </div>
</div>
<button type="button" class="btn pull-right" data-toggle="modal" data-target="#quality">POP UP</button>