Я дал пользователям возможность войти в систему с помощью входа в систему Google, но каждый раз, когда пользователь входит в систему с помощью входа в систему Google, он всегда перенаправляется в одно и то же место, но я хочу, чтобы пользователь не был новым, его следует перенаправить на другого пользователя. стр.
До сих пор каждый раз, когда пользователь входит в систему с помощью входа в систему Google, он перенаправляет пользователя на страницу загрузки файла. LOGIN_REDIRECT_URL = 'fileupload'
Но я не могу перенаправить старого пользователя в другое место.
URL перенаправления входа в систему
LOGIN_REDIRECT_URL = 'fileupload'
HTML-форма
{% load static %}
{% load crispy_forms_tags %}
{% block content %}
<div class="modal fade" id="Modal" aria-labelledby="ModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="Label">User Profile</h5>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<form action="{% url 'uploadprofile' %}" method="POST">
{%csrf_token%}
<div class="form-group">
<input type="hidden" name="username" class="form-control" id="username" value="{{user.username}}" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
</div>
<div class="form-group">
<label for="contact_no">Contact Number:</label>
<input type="tel" name="contact_no" class="form-control" id="contact_no" placeholder="Contact no." style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
</div>
<div class="form-group">
<label for="dept_no">Department Number:</label>
<select id="dept_no" name="dept_no" class="form-control" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
<option value="1">Sales</option>
<option value="2">HR</option>
<option value="3">Business Dev.</option>
<option value="4">Engineering</option>
<option value="5">SCM</option>
<option value="6">CSIT</option>
</select>
</div>
<div class="form-group">
<label for="status">Status:</label>
<select id="status" name="status" class="form-control" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
<option value="0">Active</option>
<option value="1">Inactive</option>
</select>
</div>
<div class="form-group">
<label for="industry_seg">Industry Segment:</label>
<select id="industry_seg" name="industry_seg" class="form-control" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
<option value="software">Software</option>
<option value="programmer">Programmer</option>
<option value="testing">Testing</option>
</select>
</div>
<div class="form-group">
<label for="created_by">Created By:</label>
<input type="text" value="13" class="form-control" id="created_by" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
</div>
<div class="form-group">
<label for="updated_by">Updated By:</label>
<input type="text" value="13" class="form-control" id="updated_by" style="font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif" required>
</div>
<div class="modal-footer">
<!--<button type="submit" id="btn-submit" class="btn btn-primary" onclick="saveTags()">Submit</button>-->
<input type="submit" class="btn btn-primary" value="Submit" id="upload">
<input type="reset" value="Reset" class="btn btn-secondary">
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}