Procházet zdrojové kódy

完成了登录注册,修复了csrf问题

Shellmiao před 4 roky
rodič
revize
85611a407d
40 změnil soubory, kde provedl 169 přidání a 455 odebrání
  1. 20 0
      Profile/forms.py
  2. 12 0
      Profile/urls.py
  3. 87 1
      Profile/views.py
  4. 1 1
      WeiBoCrawler/urls.py
  5. 22 0
      templates/Profile/login.html
  6. 27 0
      templates/Profile/register.html
  7. 0 11
      templates/account/account_inactive.html
  8. 0 40
      templates/account/base.html
  9. 0 74
      templates/account/email.html
  10. 0 7
      templates/account/email/base_message.txt
  11. 0 7
      templates/account/email/email_confirmation_message.txt
  12. 0 1
      templates/account/email/email_confirmation_signup_message.txt
  13. 0 1
      templates/account/email/email_confirmation_signup_subject.txt
  14. 0 4
      templates/account/email/email_confirmation_subject.txt
  15. 0 9
      templates/account/email/password_reset_key_message.txt
  16. 0 4
      templates/account/email/password_reset_key_subject.txt
  17. 0 31
      templates/account/email_confirm.html
  18. 0 46
      templates/account/login.html
  19. 0 21
      templates/account/logout.html
  20. 0 2
      templates/account/messages/cannot_delete_primary_email.txt
  21. 0 2
      templates/account/messages/email_confirmation_sent.txt
  22. 0 2
      templates/account/messages/email_confirmed.txt
  23. 0 2
      templates/account/messages/email_deleted.txt
  24. 0 4
      templates/account/messages/logged_in.txt
  25. 0 2
      templates/account/messages/logged_out.txt
  26. 0 2
      templates/account/messages/password_changed.txt
  27. 0 2
      templates/account/messages/password_set.txt
  28. 0 2
      templates/account/messages/primary_email_set.txt
  29. 0 2
      templates/account/messages/unverified_primary_email.txt
  30. 0 16
      templates/account/password_change.html
  31. 0 24
      templates/account/password_reset.html
  32. 0 16
      templates/account/password_reset_done.html
  33. 0 23
      templates/account/password_reset_from_key.html
  34. 0 9
      templates/account/password_reset_from_key_done.html
  35. 0 15
      templates/account/password_set.html
  36. 0 21
      templates/account/signup.html
  37. 0 11
      templates/account/signup_closed.html
  38. 0 5
      templates/account/snippets/already_logged_in.html
  39. 0 12
      templates/account/verification_sent.html
  40. 0 23
      templates/account/verified_email_required.html

+ 20 - 0
Profile/forms.py

@@ -0,0 +1,20 @@
+# 引入表单类
+from django import forms
+# 引入 User 模型
+from django.contrib.auth.models import User
+
+
+# 登录表单,继承了 forms.Form 类
+class UserLoginForm(forms.Form):
+    username = forms.CharField()
+    password = forms.CharField()
+
+
+# 注册用户表单
+class UserRegisterForm(forms.ModelForm):
+    # 复写 User 的密码
+    password = forms.CharField()
+
+    class Meta:
+        model = User
+        fields = ('username',)

+ 12 - 0
Profile/urls.py

@@ -0,0 +1,12 @@
+from django.urls import path
+from .views import user_login, user_logout, user_is_logged, user_register
+
+app_name = 'userprofile'
+
+urlpatterns = [
+    # 用户登录
+    path('login/', user_login, name='login'),
+    path('logout/', user_logout, name='logout'),
+    path('islogged/', user_is_logged, name='islogged'),
+    path('register/', user_register, name='register'),
+]

+ 87 - 1
Profile/views.py

@@ -1,3 +1,89 @@
-from django.shortcuts import render
+from django.shortcuts import render, redirect
+from django.contrib.auth import authenticate, login, logout
+from django.http import HttpResponse, JsonResponse
+from django.views.decorators.csrf import ensure_csrf_cookie
+from .forms import UserLoginForm, UserRegisterForm
+
 
 # Create your views here.
+
+def user_login(request):
+    ret = {}
+    if request.method == 'POST':
+        user_login_form = UserLoginForm(data=request.POST)
+        print(request.POST)
+        if user_login_form.is_valid():
+            # .cleaned_data 清洗出合法数据
+            data = user_login_form.cleaned_data
+            # 检验账号、密码是否正确匹配数据库中的某个用户
+            # 如果均匹配则返回这个 user 对象
+            user = authenticate(username=data['username'], password=data['password'])
+            if user:
+                # 将用户数据保存在 session 中,即实现了登录动作
+                login(request, user)
+                ret['code'] = 1001
+                ret['message'] = '登陆成功'
+                return JsonResponse(ret)
+            else:
+                ret['code'] = 1002
+                ret['message'] = '账号或密码输入有误。请重新输入'
+                return JsonResponse(ret)
+        else:
+            ret['code'] = 1003
+            ret['message'] = '账号或密码输入不合法'
+            return JsonResponse(ret)
+    elif request.method == 'GET':
+        user_login_form = UserLoginForm()
+        context = {'form': user_login_form}
+        return render(request, 'Profile/login.html', context)
+    else:
+        ret['code'] = 1004
+        ret['message'] = '请使用GET或POST请求数据'
+        return JsonResponse(ret)
+
+
+def user_logout(request):
+    logout(request)
+    ret = {'code': 1001, 'message': '登出成功'}
+    return JsonResponse(ret)
+
+
+def user_is_logged(request):
+    ret = {}
+    if request.user.is_authenticated:
+        ret['code'] = 1001
+        ret['message'] = '已登陆'
+        return JsonResponse(ret)
+    else:
+        ret['code'] = 1002
+        ret['message'] = '未登陆'
+        return JsonResponse(ret)
+
+
+# 用户注册
+def user_register(request):
+    ret = {}
+    if request.method == 'POST':
+        user_register_form = UserRegisterForm(data=request.POST)
+        print(request.POST)
+        if user_register_form.is_valid():
+            new_user = user_register_form.save(commit=False)
+            # 设置密码
+            new_user.set_password(user_register_form.cleaned_data['password'])
+            new_user.save()
+            # 保存好数据后立即登录并返回博客列表页面
+            ret['code'] = 1001
+            ret['message'] = '注册成功'
+            return JsonResponse(ret)
+        else:
+            ret['code'] = 1002
+            ret['message'] = '注册表单输入有误。请重新输入'
+            return JsonResponse(ret)
+    elif request.method == 'GET':
+        user_register_form = UserRegisterForm()
+        context = {'form': user_register_form}
+        return render(request, 'Profile/register.html', context)
+    else:
+        ret['code'] = 1003
+        ret['message'] = '请使用GET或POST请求数据'
+        return JsonResponse(ret)

+ 1 - 1
WeiBoCrawler/urls.py

@@ -19,5 +19,5 @@ from django.urls import path, include
 urlpatterns = [
     path('admin/', admin.site.urls),
     path('craw_keywords/', include(('CrawKeywords.urls', "CrawKeywords"), namespace='CrawKeywords')),
-    path('accounts/', include('allauth.urls')),
+    path('profile/', include('Profile.urls', namespace='Profile')),
 ]

+ 22 - 0
templates/Profile/login.html

@@ -0,0 +1,22 @@
+<div class="container">
+    <div class="row">
+        <div class="col-12">
+            <br>
+            <form method="post" action=".">
+                {% csrf_token %}
+                <!-- 账号 -->
+                <div class="form-group">
+                    <label for="username">账号</label>
+                    <input type="text" class="form-control" id="username" name="username">
+                </div>
+                <!-- 密码 -->
+                <div class="form-group">
+                    <label for="password">密码</label>
+                    <input type="password" class="form-control" id="password" name="password">
+                </div>
+                <!-- 提交按钮 -->
+                <button type="submit" class="btn btn-primary">提交</button>
+            </form>
+        </div>
+    </div>
+</div>

+ 27 - 0
templates/Profile/register.html

@@ -0,0 +1,27 @@
+<div class="container">
+    <div class="row">
+        <div class="col-12">
+            <br>
+            <form method="post" action=".">
+                {% csrf_token %}
+                <!-- 账号 -->
+                <div class="form-group col-md-4">
+                    <label for="username">昵称</label>
+                    <input type="text" class="form-control" id="username" name="username" required>
+                </div>
+                <!-- 邮箱 -->
+                <div class="form-group col-md-4">
+                    <label for="email">Email</label>
+                    <input type="text" class="form-control" id="email" name="email">
+                </div>
+                <!-- 密码 -->
+                <div class="form-group col-md-4">
+                    <label for="password">设置密码</label>
+                    <input type="password" class="form-control" id="password" name="password" required>
+                </div>
+                <!-- 提交按钮 -->
+                <button type="submit" class="btn btn-primary">提交</button>
+            </form>
+        </div>
+    </div>
+</div>

+ 0 - 11
templates/account/account_inactive.html

@@ -1,11 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Account Inactive" %}{% endblock %}
-
-{% block content %}
-<h1>{% trans "Account Inactive" %}</h1>
-
-<p>{% trans "This account is inactive." %}</p>
-{% endblock %}

+ 0 - 40
templates/account/base.html

@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>{% block head_title %}{% endblock %}</title>
-    {% block extra_head %}
-    {% endblock %}
-  </head>
-  <body>
-    {% block body %}
-
-    {% if messages %}
-    <div>
-      <strong>Messages:</strong>
-      <ul>
-        {% for message in messages %}
-        <li>{{message}}</li>
-        {% endfor %}
-      </ul>
-    </div>
-    {% endif %}
-
-    <div>
-      <strong>Menu:</strong>
-      <ul>
-        {% if user.is_authenticated %}
-        <li><a href="{% url 'account_email' %}">Change E-mail</a></li>
-        <li><a href="{% url 'account_logout' %}">Sign Out</a></li>
-        {% else %}
-        <li><a href="{% url 'account_login' %}">Sign In</a></li>
-        <li><a href="{% url 'account_signup' %}">Sign Up</a></li>
-        {% endif %}
-      </ul>
-    </div>
-    {% block content %}
-    {% endblock %}
-    {% endblock %}
-    {% block extra_body %}
-    {% endblock %}
-  </body>
-</html>

+ 0 - 74
templates/account/email.html

@@ -1,74 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "E-mail Addresses" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "E-mail Addresses" %}</h1>
-{% if user.emailaddress_set.all %}
-<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
-
-<form action="{% url 'account_email' %}" class="email_list" method="post">
-{% csrf_token %}
-<fieldset class="blockLabels">
-
-  {% for emailaddress in user.emailaddress_set.all %}
-<div class="ctrlHolder">
-      <label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
-
-      <input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
-
-{{ emailaddress.email }}
-    {% if emailaddress.verified %}
-    <span class="verified">{% trans "Verified" %}</span>
-    {% else %}
-    <span class="unverified">{% trans "Unverified" %}</span>
-    {% endif %}
-      {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
-</label>
-</div>
-  {% endfor %}
-
-<div class="buttonHolder">
-      <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
-      <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
-      <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
-</div>
-
-</fieldset>
-</form>
-
-{% else %}
-<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
-
-{% endif %}
-
-  {% if can_add_email %}
-    <h2>{% trans "Add E-mail Address" %}</h2>
-
-    <form method="post" action="{% url 'account_email' %}" class="add_email">
-        {% csrf_token %}
-        {{ form.as_p }}
-        <button name="action_add" type="submit">{% trans "Add E-mail" %}</button>
-    </form>
-  {% endif %}
-
-{% endblock %}
-
-
-{% block extra_body %}
-<script type="text/javascript">
-(function() {
-  var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
-  var actions = document.getElementsByName('action_remove');
-  if (actions.length) {
-    actions[0].addEventListener("click", function(e) {
-      if (! confirm(message)) {
-        e.preventDefault();
-      }
-    });
-  }
-})();
-</script>
-{% endblock %}

+ 0 - 7
templates/account/email/base_message.txt

@@ -1,7 +0,0 @@
-{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}
-
-{% block content %}{% endblock %}
-
-{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}感谢您使用 {{ site_name }}!
-{{ site_domain }}{% endblocktrans %}
-{% endautoescape %}

+ 0 - 7
templates/account/email/email_confirmation_message.txt

@@ -1,7 +0,0 @@
-{% extends "account/email/base_message.txt" %}
-{% load account %}
-{% load i18n %}
-
-{% block content %}{% autoescape off %}{% user_display user as user_display %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}用户 {{ user_display }} 正在注册 [公众舆情分析系统] : {{ site_domain }} .
-
-前往地址 {{ activate_url }} 来验证您的身份 {% endblocktrans %}{% endautoescape %}{% endblock %}

+ 0 - 1
templates/account/email/email_confirmation_signup_message.txt

@@ -1 +0,0 @@
-{% include "account/email/email_confirmation_message.txt" %}

+ 0 - 1
templates/account/email/email_confirmation_signup_subject.txt

@@ -1 +0,0 @@
-{% include "account/email/email_confirmation_subject.txt" %}

+ 0 - 4
templates/account/email/email_confirmation_subject.txt

@@ -1,4 +0,0 @@
-{% load i18n %}
-{% autoescape off %}
-{% blocktrans %}[公众舆情分析系统]请验证邮箱{% endblocktrans %}
-{% endautoescape %}

+ 0 - 9
templates/account/email/password_reset_key_message.txt

@@ -1,9 +0,0 @@
-{% extends "account/email/base_message.txt" %}
-{% load i18n %}
-
-{% block content %}{% autoescape off %}{% blocktrans %}You're receiving this e-mail because you or someone else has requested a password for your user account.
-It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}
-
-{{ password_reset_url }}{% if username %}
-
-{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}{% endif %}{% endautoescape %}{% endblock %}

+ 0 - 4
templates/account/email/password_reset_key_subject.txt

@@ -1,4 +0,0 @@
-{% load i18n %}
-{% autoescape off %}
-{% blocktrans %}Password Reset E-mail{% endblocktrans %}
-{% endautoescape %}

+ 0 - 31
templates/account/email_confirm.html

@@ -1,31 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% load account %}
-
-{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
-
-
-{% block content %}
-<h1>{% trans "Confirm E-mail Address" %}</h1>
-
-{% if confirmation %}
-
-{% user_display confirmation.email_address.user as user_display %}
-
-<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
-
-<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
-{% csrf_token %}
-    <button type="submit">{% trans 'Confirm' %}</button>
-</form>
-
-{% else %}
-
-{% url 'account_email' as email_url %}
-
-<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
-
-{% endif %}
-
-{% endblock %}

+ 0 - 46
templates/account/login.html

@@ -1,46 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% load account socialaccount %}
-
-{% block head_title %}{% trans "Sign In" %}{% endblock %}
-
-{% block content %}
-
-<h1>{% trans "Sign In" %}</h1>
-
-{% get_providers as socialaccount_providers %}
-
-{% if socialaccount_providers %}
-<p>{% blocktrans with site.name as site_name %}Please sign in with one
-of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
-for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
-
-<div class="socialaccount_ballot">
-
-  <ul class="socialaccount_providers">
-    {% include "socialaccount/snippets/provider_list.html" with process="login" %}
-  </ul>
-
-  <div class="login-or">{% trans 'or' %}</div>
-
-</div>
-
-{% include "socialaccount/snippets/login_extra.html" %}
-
-{% else %}
-<p>{% blocktrans %}If you have not hhhhhhhhhhhhhhhhhhhhhcreated an account yet, then please
-<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
-{% endif %}
-
-<form class="login" method="POST" action="{% url 'account_login' %}">
-  {% csrf_token %}
-  {{ form.as_p }}
-  {% if redirect_field_value %}
-  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
-  {% endif %}
-  <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
-  <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
-</form>
-
-{% endblock %}

+ 0 - 21
templates/account/logout.html

@@ -1,21 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Sign Out" %}{% endblock %}
-
-{% block content %}
-<h1>{% trans "Sign Out" %}</h1>
-
-<p>{% trans 'Are you sure you want to sign out?' %}</p>
-
-<form method="post" action="{% url 'account_logout' %}">
-  {% csrf_token %}
-  {% if redirect_field_value %}
-  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
-  {% endif %}
-  <button type="submit">{% trans 'Sign Out' %}</button>
-</form>
-
-
-{% endblock %}

+ 0 - 2
templates/account/messages/cannot_delete_primary_email.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}You cannot remove your primary e-mail address ({{email}}).{% endblocktrans %}

+ 0 - 2
templates/account/messages/email_confirmation_sent.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Confirmation e-mail sent to {{email}}.{% endblocktrans %}

+ 0 - 2
templates/account/messages/email_confirmed.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}

+ 0 - 2
templates/account/messages/email_deleted.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Removed e-mail address {{email}}.{% endblocktrans %}

+ 0 - 4
templates/account/messages/logged_in.txt

@@ -1,4 +0,0 @@
-{% load account %}
-{% load i18n %}
-{% user_display user as name %}
-{% blocktrans %}Successfully signed in as {{name}}.{% endblocktrans %}

+ 0 - 2
templates/account/messages/logged_out.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}You have signed out.{% endblocktrans %}

+ 0 - 2
templates/account/messages/password_changed.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Password successfully changed.{% endblocktrans %}

+ 0 - 2
templates/account/messages/password_set.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Password successfully set.{% endblocktrans %}

+ 0 - 2
templates/account/messages/primary_email_set.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Primary e-mail address set.{% endblocktrans %}

+ 0 - 2
templates/account/messages/unverified_primary_email.txt

@@ -1,2 +0,0 @@
-{% load i18n %}
-{% blocktrans %}Your primary e-mail address must be verified.{% endblocktrans %}

+ 0 - 16
templates/account/password_change.html

@@ -1,16 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Change Password" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "Change Password" %}</h1>
-
-    <form method="POST" action="{% url 'account_change_password' %}" class="password_change">
-        {% csrf_token %}
-        {{ form.as_p }}
-        <button type="submit" name="action">{% trans "Change Password" %}</button>
-        <a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
-    </form>
-{% endblock %}

+ 0 - 24
templates/account/password_reset.html

@@ -1,24 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% load account %}
-
-{% block head_title %}{% trans "Password Reset" %}{% endblock %}
-
-{% block content %}
-
-    <h1>{% trans "Password Reset" %}</h1>
-    {% if user.is_authenticated %}
-    {% include "account/snippets/already_logged_in.html" %}
-    {% endif %}
-
-    <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
-
-    <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
-        {% csrf_token %}
-        {{ form.as_p }}
-        <input type="submit" value="{% trans 'Reset My Password' %}" />
-    </form>
-
-    <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
-{% endblock %}

+ 0 - 16
templates/account/password_reset_done.html

@@ -1,16 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% load account %}
-
-{% block head_title %}{% trans "Password Reset" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "Password Reset" %}</h1>
-    
-    {% if user.is_authenticated %}
-    {% include "account/snippets/already_logged_in.html" %}
-    {% endif %}
-    
-    <p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
-{% endblock %}

+ 0 - 23
templates/account/password_reset_from_key.html

@@ -1,23 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% block head_title %}{% trans "Change Password" %}{% endblock %}
-
-{% block content %}
-    <h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
-
-    {% if token_fail %}
-        {% url 'account_reset_password' as passwd_reset_url %}
-        <p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used.  Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
-    {% else %}
-        {% if form %}
-            <form method="POST" action="{{ action_url }}">
-                {% csrf_token %}
-                {{ form.as_p }}
-                <input type="submit" name="action" value="{% trans 'change password' %}"/>
-            </form>
-        {% else %}
-            <p>{% trans 'Your password is now changed.' %}</p>
-        {% endif %}
-    {% endif %}
-{% endblock %}

+ 0 - 9
templates/account/password_reset_from_key_done.html

@@ -1,9 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-{% block head_title %}{% trans "Change Password" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "Change Password" %}</h1>
-    <p>{% trans 'Your password is now changed.' %}</p>
-{% endblock %}

+ 0 - 15
templates/account/password_set.html

@@ -1,15 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Set Password" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "Set Password" %}</h1>
-
-    <form method="POST" action="{% url 'account_set_password' %}" class="password_set">
-        {% csrf_token %}
-        {{ form.as_p }}
-        <input type="submit" name="action" value="{% trans 'Set Password' %}"/>
-    </form>
-{% endblock %}

+ 0 - 21
templates/account/signup.html

@@ -1,21 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Signup" %}{% endblock %}
-
-{% block content %}
-<h1>{% trans "Sign Up" %}</h1>
-
-<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
-
-<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
-  {% csrf_token %}
-  {{ form.as_p }}
-  {% if redirect_field_value %}
-  <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
-  {% endif %}
-  <button type="submit">{% trans "Sign Up" %} &raquo;</button>
-</form>
-
-{% endblock %}

+ 0 - 11
templates/account/signup_closed.html

@@ -1,11 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %}
-
-{% block content %}
-<h1>{% trans "Sign Up Closed" %}</h1>
-
-<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
-{% endblock %}

+ 0 - 5
templates/account/snippets/already_logged_in.html

@@ -1,5 +0,0 @@
-{% load i18n %}
-{% load account %}
-
-{% user_display user as user_display %}
-<p><strong>{% trans "Note" %}:</strong> {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}</p>

+ 0 - 12
templates/account/verification_sent.html

@@ -1,12 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
-
-{% block content %}
-    <h1>{% trans "Verify Your E-mail Address" %}</h1>
-
-    <p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
-
-{% endblock %}

+ 0 - 23
templates/account/verified_email_required.html

@@ -1,23 +0,0 @@
-{% extends "account/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
-
-{% block content %}
-<h1>{% trans "Verify Your E-mail Address" %}</h1>
-
-{% url 'account_email' as email_url %}
-
-<p>{% blocktrans %}This part of the site requires us to verify that
-you are who you claim to be. For this purpose, we require that you
-verify ownership of your e-mail address. {% endblocktrans %}</p>
-
-<p>{% blocktrans %}We have sent an e-mail to you for
-verification. Please click on the link inside this e-mail. Please
-contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
-
-<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktrans %}</p>
-
-
-{% endblock %}