feat: add portal allauth account flow
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
你好,
|
||||
|
||||
请打开下面的链接完成 cmhub 邮箱验证:
|
||||
|
||||
{{ activate_url }}
|
||||
|
||||
如果这不是你的操作,可以忽略本邮件。
|
||||
@@ -0,0 +1 @@
|
||||
[cmhub] 验证你的邮箱
|
||||
@@ -0,0 +1,21 @@
|
||||
{% extends "portal/base.html" %}
|
||||
|
||||
{% block title %}登录 - cmhub{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cmhub-panel">
|
||||
<h1 class="h4 mb-3">登录</h1>
|
||||
<form method="post" action="{% url 'portal-login' %}">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{{ form.as_p }}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
||||
{% endif %}
|
||||
<button class="btn btn-primary w-100" type="submit">登录</button>
|
||||
</form>
|
||||
<div class="mt-3 text-secondary">
|
||||
没有账号?<a href="{% url 'portal-signup' %}">注册</a>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends "portal/base.html" %}
|
||||
|
||||
{% block title %}退出 - cmhub{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cmhub-panel">
|
||||
<h1 class="h4 mb-3">退出登录</h1>
|
||||
<form method="post" action="{% url 'portal-logout' %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-primary w-100" type="submit">退出</button>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,21 @@
|
||||
{% extends "portal/base.html" %}
|
||||
|
||||
{% block title %}注册 - cmhub{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cmhub-panel">
|
||||
<h1 class="h4 mb-3">注册</h1>
|
||||
<form method="post" action="{% url 'portal-signup' %}">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{{ form.as_p }}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
||||
{% endif %}
|
||||
<button class="btn btn-primary w-100" type="submit">注册</button>
|
||||
</form>
|
||||
<div class="mt-3 text-secondary">
|
||||
已有账号?<a href="{% url 'portal-login' %}">登录</a>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends "portal/base.html" %}
|
||||
|
||||
{% block title %}验证邮箱 - cmhub{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="cmhub-panel">
|
||||
<h1 class="h4 mb-3">验证邮箱</h1>
|
||||
<p class="mb-0 text-secondary">验证邮件已发送,请先完成邮箱验证再登录。</p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user