-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from anjaniacatus/registration_feat_bis
Registration feat bis : this PR will cover the registration and resetting password functionality
- Loading branch information
Showing
58 changed files
with
601 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django import forms | ||
from allauth.account.forms import SignupForm | ||
|
||
|
||
class CustomSignupForm(SignupForm): | ||
first_name = forms.CharField(max_length=30, label='First Name') | ||
last_name = forms.CharField(max_length=30, label='Last Name') | ||
email = forms.EmailField() | ||
|
||
def signup(self, request, user): | ||
user.first_name = self.cleaned_data['first_name'] | ||
user.last_name = self.cleaned_data['last_name'] | ||
user.email = self.cleaned_data['email'] | ||
user.save() | ||
return user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
urlpatterns = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# from django.shortcuts import render | ||
|
||
# Create your views here. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
django-extensions>=3.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
django>=4.2,<5 | ||
django>=4.2,<=5 | ||
coverage==7.5.3 | ||
dj-database-url==2.2.0 | ||
psycopg2-binary==2.9.9 | ||
python-dotenv==1.0.1 | ||
pytest==8.2.2 | ||
pytest==8.3.3 | ||
pytest-django==4.8.0 | ||
pytest-dotenv==0.5.2 | ||
django-browser-reload==1.16.0 | ||
django-template-partials==24.4 | ||
whitenoise==6.8.2 | ||
django-allauth==65.2.0 | ||
django-extensions>=3.2.0 | ||
crispy-tailwind==1.0.3 | ||
django-template-partials==24.4 | ||
django-template-partials==24.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends "_base.html" %} | ||
{% load i18n %} | ||
{% load allauth %} | ||
{% block head_title %} | ||
{% translate "Account Inactive" %} | ||
{% endblock head_title %} | ||
{% block content %} | ||
{% element h1 %} | ||
{% translate "Account Inactive" %} | ||
{% endelement %} | ||
{% element p %} | ||
{% translate "This account is inactive." %} | ||
{% endelement %} | ||
{% endblock content %} |
13 changes: 13 additions & 0 deletions
13
templates/account/email/account_already_exists_message.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends "account/email/base_message.txt" %} | ||
{% load i18n %} | ||
|
||
{% block content %}{% autoescape off %}{% blocktrans %}You are receiving this email because you or someone else tried to signup for an | ||
account using email address: | ||
|
||
{{ email }} | ||
|
||
However, an account using that email address already exists. In case you have | ||
forgotten about this, please use the password forgotten procedure to recover | ||
your account: | ||
|
||
{{ password_reset_url }}{% endblocktrans %}{% endautoescape %}{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% load i18n %} | ||
{% autoescape off %} | ||
{% blocktrans %}Account Already Exists{% endblocktrans %} | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %} | ||
|
||
{% block content %}{% endblock content %} | ||
|
||
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}! | ||
{{ site_domain }}{% endblocktrans %} | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends "account/email/base_message.txt" %} | ||
{% load account %} | ||
{% load i18n %} | ||
|
||
{% block content %}{% autoescape off %}{% blocktrans %}You are receiving this mail because the following change was made to your account:{% endblocktrans %} | ||
|
||
{% block notification_message %} | ||
{% endblock notification_message%} | ||
|
||
{% blocktrans %}If you do not recognize this change then please take proper security precautions immediately. The change to your account originates from: | ||
|
||
- IP address: {{ip}} | ||
- Browser: {{user_agent}} | ||
- Date: {{timestamp}}{% endblocktrans %}{% endautoescape %}{% endblock %} |
Oops, something went wrong.