initial commit
This commit is contained in:
commit
6f5167c24f
45 changed files with 763 additions and 0 deletions
8
templates/403_csrf.html
Normal file
8
templates/403_csrf.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Forbidden (403){% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Forbidden (403)</h1>
|
||||
<p>CSRF verification failed. Request aborted.</p>
|
||||
{% endblock content %}
|
||||
7
templates/404.html
Normal file
7
templates/404.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}404 Page not found{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Page not found</h1>
|
||||
{% endblock content %}
|
||||
8
templates/500.html
Normal file
8
templates/500.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}500 Server Error{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>500 Server Error</h1>
|
||||
<p>Looks like something went wrong!</p>
|
||||
{% endblock content %}
|
||||
14
templates/account/email/password_reset_key_message.txt
Normal file
14
templates/account/email/password_reset_key_message.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% load i18n %}
|
||||
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
|
||||
|
||||
We've received a request to reset your password. If you didn't make this request, you can safely ignore this email. Otherwise, click the button below to reset your password.{% endblocktrans %}
|
||||
|
||||
{{ password_reset_url }}
|
||||
|
||||
{% if username %}{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}
|
||||
|
||||
{% endif %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
|
||||
{{ site_domain }}{% endblocktrans %}
|
||||
|
||||
|
||||
|
||||
1
templates/account/email/password_reset_key_subject.txt
Normal file
1
templates/account/email/password_reset_key_subject.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
Password Reset E-mail
|
||||
14
templates/account/login.html
Normal file
14
templates/account/login.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Log in{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Log in</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-success" type="submit">Log in</button>
|
||||
</form>
|
||||
<a href="{% url 'account_reset_password' %}">Forgot Password?</a>
|
||||
{% endblock content %}
|
||||
13
templates/account/password_change.html
Normal file
13
templates/account/password_change.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Change Password{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Change Password</h2>
|
||||
<form method="post" action="{% url 'account_change_password' %}" class="password_change">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-success" type="submit">Change Password</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
15
templates/account/password_reset.html
Normal file
15
templates/account/password_reset.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Password Reset{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Forgot your password? </h2>
|
||||
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">Reset Password</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
9
templates/account/password_reset_done.html
Normal file
9
templates/account/password_reset_done.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Password Reset Done{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Password Reset</h1>
|
||||
<p>We have sent you an e-mail. Please contact us if you do not receive it in a few minutes.</p>
|
||||
{% endblock content %}
|
||||
22
templates/account/password_reset_from_key.html
Normal file
22
templates/account/password_reset_from_key.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Change Password{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% if token_fail %}Bad Token{% else %}Change Password{% endif %}</h1>
|
||||
|
||||
{% if token_fail %}
|
||||
<p>The password reset link was invalid. Perhaps it has already been used? Please request a <a href="{% url 'account_reset_password' %}">new password reset</a>.</p>
|
||||
{% else %}
|
||||
{% if form %}
|
||||
<form method="POST" action=".">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-primary" type="submit">Change Password</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>Your password is now changed.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content%}
|
||||
9
templates/account/password_reset_from_key_done.html
Normal file
9
templates/account/password_reset_from_key_done.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Change Password Done{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Password Change Done</h1>
|
||||
<p>Your password has been changed.</p>
|
||||
{% endblock content %}
|
||||
14
templates/account/password_set.html
Normal file
14
templates/account/password_set.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Set Password{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="" class="password_set">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form password_set_form %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit" name="action" value="{% trans "Set Password" %}"/>Change Password</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
13
templates/account/signup.html
Normal file
13
templates/account/signup.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Sign up{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Sign up</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-success" type="submit">Sign up</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
76
templates/base.html
Normal file
76
templates/base.html
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{% load static %}
|
||||
{% load socialaccount %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
<title>{% block title %}DjangoX{% endblock title %}</title>
|
||||
<meta name="description" content="A framework for launching new Django projects quickly.">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/favicon.ico' %}">
|
||||
|
||||
{% block css %}
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">DjangoX</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
{% if user.is_authenticated %}
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ user.username }}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu">
|
||||
<a class="dropdown-item" href="{% url 'account_change_password' %}">Change password</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{% url 'account_logout' %}">Log out</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<form class="form-inline ml-auto">
|
||||
<a href="{% url 'account_login' %}" class="btn btn-outline-secondary">Log in</a>
|
||||
<a href="{% url 'account_signup' %}" class="btn btn-primary ml-2">Sign up</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
{% block content %}
|
||||
<p>Default content...</p>
|
||||
{% endblock content %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{% block javascript %}
|
||||
<!-- Bootstrap JavaScript -->
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- 3rd party JavaScript -->
|
||||
|
||||
<!-- Project JS -->
|
||||
|
||||
|
||||
{% endblock javascript %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
7
templates/pages/about.html
Normal file
7
templates/pages/about.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}About page{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>About page</h1>
|
||||
{% endblock content %}
|
||||
10
templates/pages/home.html
Normal file
10
templates/pages/home.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Home page{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Home page</h1>
|
||||
<img src="{% static 'images/falconx.png' %}" class="img-fluid" alt="FalconX launch"/>
|
||||
{% endblock content %}
|
||||
|
||||
6
templates/registration/login.html
Normal file
6
templates/registration/login.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<h2>Login</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue