增加登录之后的重定向

This commit is contained in:
virusdefender
2015-10-20 20:07:35 +08:00
parent 190565da88
commit da54a1245b
5 changed files with 15 additions and 25 deletions

View File

@@ -0,0 +1,24 @@
{% extends "oj_base.html" %}
{% block title %}
授权登录
{% endblock %}
{% block body %}
<div class="container main">
<div class="text-center">
{% if request.user.is_authenticated %}
<p>3秒钟后将跳转到<span id="link">{{ callback }}</span></p>
<script>setTimeout(function(){
window.location.href = "{{ callback }}?token={{ token }}"},
3000);
</script>
{% else %}
<script>window.location.href = "/login/";</script>
{% endif %}
</div>
</div>
{% endblock %}
{% block js_block %}
{% endblock %}