Skip to content

Commit 1134b4e

Browse files
committed
feat: Enable regular user registration
1 parent 6f3e0c9 commit 1134b4e

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

djangosnippets/adapters.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
from allauth.account.adapter import DefaultAccountAdapter
21
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
32

43

5-
class DjangoSnippetsAccountAdapter(DefaultAccountAdapter):
6-
def is_open_for_signup(self, request):
7-
"""Disabling common signup completely"""
8-
return False
9-
10-
114
class DjangoSnippetsSocialAccountAdapter(DefaultSocialAccountAdapter):
125
def is_open_for_signup(self, request, sociallogin):
136
"""

djangosnippets/settings/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def user_url(user):
143143
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
144144
ACCOUNT_LOGOUT_ON_GET = True
145145
ACCOUNT_USERNAME_MIN_LENGTH = 3
146-
ACCOUNT_ADAPTER = "djangosnippets.adapters.DjangoSnippetsAccountAdapter"
147146
SOCIALACCOUNT_ADAPTER = "djangosnippets.adapters.DjangoSnippetsSocialAccountAdapter"
148147
SOCIALACCOUNT_AUTO_SIGNUP = False
149148
SOCIALACCOUNT_LOGIN_ON_GET = True

djangosnippets/templates/account/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% block content %}
88
<div class="w-[40rem] flex flex-col items-center justify-center mx-auto p-8 font-common shadow-sign-content rounded-lg">
99
<h3>Sign In</h3>
10-
<p>Don't have an account? <a class="underline text-base-green-600 hover:text-base-orange-400">Sign Up</a></p>
10+
<p>Don't have an account? <a href="{{ signup_url }}" class="underline text-base-green-600 hover:text-base-orange-400">Sign Up</a></p>
1111
{% include "socialaccount/snippets/login_extra.html" %}
1212
<form class="login flex flex-col items-center w-[80%]" method="POST" action="{% url 'account_login' %}">
1313
{% csrf_token %}

djangosnippets/templates/account/signup_closed.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)