You can’t trigger a client-side modal directly from Django views.py, since it's server-side. However, you can set a flag in the context and then use JavaScript in the template to show a modal conditionally.