-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
252 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django import forms | ||
from django.contrib.auth import get_user_model | ||
from django.contrib.auth.forms import UserCreationForm as DjUserCreationForm | ||
|
||
|
||
class UserCreationForm(DjUserCreationForm): | ||
class Meta: | ||
model = get_user_model() | ||
fields = ["username", "email"] |
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,20 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block content %} | ||
<main> | ||
{% for domain in domain_list %} | ||
<div class="cell"> | ||
<div> | ||
{{ domain.domain_name }} | ||
<small> | ||
<a href="">(visit ↗)</a> | ||
</small> | ||
</div> | ||
<div>{{ domain.created_at }}</div> | ||
<div> | ||
<a href="">manage</a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</main> | ||
{% endblock %} |
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 'main/layout.html' %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Sign up</h1> | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">Save</button> | ||
</form> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,32 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Log in{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
{% if next %} | ||
{% if user.is_authenticated %} | ||
<p class="alert"> | ||
Your account doesn't have access to this page. | ||
To proceed please login with an account that has access. | ||
</p> | ||
{% endif %} | ||
{% endif %} | ||
|
||
<h1>Log in</h1> | ||
<form method="post"> | ||
{{ form.as_p }} | ||
{% csrf_token %} | ||
<input type="submit" value="login"> | ||
</form> | ||
|
||
<p> | ||
<a href="{% url 'password_reset' %}">forgot password?</a> | ||
</p> | ||
<p> | ||
<a href="{% url 'user_create' %}">sign up?</a> | ||
</p> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,12 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Password change successful{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Password change successful</h1> | ||
<p>Your password was changed.</p> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,20 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Password change{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Password change</h1> | ||
<p> | ||
Please enter your old password, for security's sake, and then enter your | ||
new password twice so we can verify you typed it in correctly. | ||
</p> | ||
<form method="POST"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<input type="submit" value="Change my password"> | ||
</form> | ||
</div> | ||
</main> | ||
{% endblock %} |
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 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Email Sent{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Password reset complete</h1> | ||
<p> | ||
Your new password has been set. You can log in now on the | ||
<a href="{% url 'login' %}">log in page</a>. | ||
</p> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,16 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Enter new password{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Set a new password!</h1> | ||
<form method="POST"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<input type="submit" value="Change my password"> | ||
</form> | ||
</div> | ||
</main> | ||
{% endblock %} |
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 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Email Sent{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Check your inbox.</h1> | ||
<p> | ||
We've emailed you instructions for setting your password. You should | ||
receive the email shortly! | ||
</p> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,12 @@ | ||
{% load i18n %}{% autoescape off %} | ||
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} | ||
|
||
{% trans "Please go to the following page and choose a new password:" %} | ||
{% block reset_link %} | ||
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} | ||
{% endblock %} | ||
{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }} | ||
|
||
{% blocktrans %}{{ site_name }}{% 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,17 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}Forgot Your Password?{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<div style="margin-left: 8px;"> | ||
<h1>Forgot your password?</h1> | ||
<p>Enter your email address below, and we'll email instructions for setting a new one.</p> | ||
<form method="POST"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<input type="submit" value="send instructions"> | ||
</form> | ||
</div> | ||
</main> | ||
{% endblock %} |
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,16 +1,21 @@ | ||
from main import views | ||
|
||
from django.urls import path | ||
from django.urls import path, include | ||
|
||
|
||
# General functionality | ||
urlpatterns = [ | ||
path("", views.index, name="index"), | ||
# contacts | ||
path("add-contact/", views.ContactCreate.as_view(), name="contact_create"), | ||
path("contacts/", views.ContactList.as_view(), name="contact_list"), | ||
# domains | ||
path("add-domain/", views.DomainCreate.as_view(), name="domain_create"), | ||
path("domains/", views.DomainList.as_view(), name="domain_list"), | ||
# payments | ||
path("checkout/success/", views.checkout_success, name="checkout_success"), | ||
path("checkout/failure/", views.checkout_failure, name="checkout_failure"), | ||
# user accounts | ||
path("accounts/", include("django.contrib.auth.urls")), | ||
path("accounts/create/", views.UserCreate.as_view(), name="user_create"), | ||
] |
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