feat: add portal allauth account flow

This commit is contained in:
QiuSW
2026-07-03 11:27:45 +08:00
parent 7df2c51903
commit d61a641b7e
29 changed files with 446 additions and 31 deletions
+21
View File
@@ -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 %}