clone from upstream lithium project
This commit is contained in:
parent
6f5167c24f
commit
f946e4933a
56 changed files with 754 additions and 503 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}Forbidden (403){% endblock title %}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}404 Page not found{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}500 Server Error{% endblock %}
|
||||
|
||||
|
|
|
|||
95
templates/_base.html
Normal file
95
templates/_base.html
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{% load static %}
|
||||
<!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 href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">DjangoX</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{% url 'home' %}">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'about' %}">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
<div class="mr-auto">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
Settings
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item" href="#">{{ user.email }}</a></li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="{% url 'account_change_password' %}">Change password</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'account_logout' %}">Sign out</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="mr-auto">
|
||||
<form class="form d-flex">
|
||||
<a href="{% url 'account_login' %}" class="btn btn-outline-secondary">Log in</a>
|
||||
<a href="{% url 'account_signup' %}" class="btn btn-primary ms-2">Sign up</a>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
{% block content %}
|
||||
<p>Default content...</p>
|
||||
{% endblock content %}
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<span class="text-muted">Footer...</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% block javascript %}
|
||||
<!-- Bootstrap JavaScript -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Project JS -->
|
||||
<script src="{% static 'js/base.js' %}"></script>
|
||||
|
||||
{% endblock javascript %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Log in{% endblock %}
|
||||
|
|
@ -10,5 +10,4 @@
|
|||
{{ form|crispy }}
|
||||
<button class="btn btn-success" type="submit">Log in</button>
|
||||
</form>
|
||||
<a href="{% url 'account_reset_password' %}">Forgot Password?</a>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
18
templates/account/logout.html
Normal file
18
templates/account/logout.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Log out{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>Sign Out</h1>
|
||||
|
||||
<p>Are you sure you want to sign out?</p>
|
||||
|
||||
<form method="post" action="{% url 'account_logout' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-danger" type="submit">Sign Out</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
{% extends 'base.html' %}
|
||||
{% 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">
|
||||
<form method="post" action="{% url 'account_change_password' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-success" type="submit">Change Password</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Password Reset{% endblock %}
|
||||
|
|
@ -7,9 +7,7 @@
|
|||
<h2>Forgot your password? </h2>
|
||||
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{{ form | crispy }}
|
||||
<button class="btn btn-primary" type="submit">Reset Password</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Password Reset Done{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Change Password{% endblock title %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Change Password Done{% endblock title %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Set Password{% endblock title %}
|
||||
|
|
@ -6,9 +6,10 @@
|
|||
{% block content %}
|
||||
<form method="POST" action="" class="password_set">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form password_set_form %}
|
||||
{{ form | crispy }}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit" name="action" value="{% trans "Set Password" %}"/>Change Password</button>
|
||||
<button class="btn btn-primary" type="submit" name="action" value="Set Password">Change
|
||||
Password</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Sign up{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
{% 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>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}About page{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
{% extends 'base.html' %}
|
||||
{% 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"/>
|
||||
<div class="pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center">
|
||||
<img src="{% static 'images/logo.png' %}" class="img-fluid" alt="DjangoX logo"/>
|
||||
<p class="lead">A Django starter project with batteries.</p>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
<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