Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
dafbc8c0
Commit
dafbc8c0
authored
Oct 31, 2020
by
Yaumi
Browse files
[GREEN] make reset password & send to email
parent
50b1fb8c
Pipeline
#60043
passed with stages
in 20 minutes and 14 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/templates/app/base_reset.html
0 → 100644
View file @
dafbc8c0
{% load static %}
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Digipus
</title>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
{% block title %}{% endblock %}
<!-- Custom fonts for this template -->
<link
href=
"https://fonts.googleapis.com/css2?family=Poppins&display=swap"
rel=
"stylesheet"
>
<!-- Custom styles for this template -->
<link
rel=
"icon"
type=
"image/png"
href=
"{% static 'images/icons/logo.ico' %}"
/>
<link
href=
"{% static 'css/sb-admin-2.min.css' %}"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"{% static 'css/button.css' %}"
>
<!-- Custom styles for this page -->
<link
href=
"{% static 'vendor/datatables/dataTables.bootstrap4.min.css' %}"
rel=
"stylesheet"
>
</head>
<body
id=
"page-top"
style=
"font-family: 'Poppins', sans-serif;"
>
<!-- Page Wrapper -->
<div
id=
"wrapper"
>
<!-- Sidebar -->
<ul
class=
"navbar-nav bg-gradient-primary sidebar sidebar-dark accordion"
id=
"accordionSidebar"
>
<!-- Sidebar - Brand -->
<a
class=
"sidebar-brand d-flex align-items-center justify-content-center"
href=
"{% url 'daftar_katalog' %}"
>
<div
class=
"sidebar-brand-icon rotate-n-15"
>
</div>
<div
class=
"sidebar-brand-text mx-3"
>
Digipus
</div>
</a>
<!-- Divider -->
<hr
class=
"sidebar-divider my-0"
>
<!-- Nav Item - Dashboard -->
-->
</ul>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div
id=
"content-wrapper"
class=
"d-flex flex-column"
>
<!-- Main Content -->
<div
id=
"content"
>
<!-- Topbar -->
<nav
class=
"navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow"
>
<!-- Sidebar Toggle (Topbar) -->
<button
id=
"sidebarToggleTop"
class=
"btn btn-link d-md-none rounded-circle mr-3"
>
<em
class=
"fa fa-bars"
></em>
</button>
<div
class=
"sidebar-brand-text mx-3"
>
Diskominfo Kota Depok
</div>
<!-- Topbar Navbar -->
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div
class=
"container-fluid"
>
{% block content %}{% endblock %}
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<footer
class=
"sticky-footer bg-white"
>
<div
class=
"container my-auto"
>
<div
class=
"copyright text-center my-auto"
>
<span>
Copyright
©
Diskominfo Kota Depok 2020
</span>
</div>
</div>
</footer>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a
class=
"scroll-to-top rounded"
href=
"#page-top"
>
<em
class=
"fas fa-angle-up"
></em>
</a>
<!-- Bootstrap core JavaScript-->
<script
src=
"https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity=
"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity=
"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin=
"anonymous"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity=
"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin=
"anonymous"
></script>
<!-- Core plugin JavaScript-->
<script
src=
"https://code.jquery.com/jquery-3.5.0.min.js"
integrity=
"sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ="
crossorigin=
"anonymous"
></script>
<!-- Custom scripts for all pages-->
<script
src=
"{% static 'js/sb-admin-2.min.js' %}"
></script>
<!-- Page level plugins -->
<script
src=
"{% static 'vendor/datatables/jquery.dataTables.min.js' %}"
></script>
<script
src=
"{% static 'vendor/datatables/dataTables.bootstrap4.min.js' %}"
></script>
<!-- Page level custom scripts -->
<script
src=
"{% static 'js/demo/datatables-demo.js' %}"
></script>
</body>
</html>
\ No newline at end of file
app/templates/password_reset.html
0 → 100644
View file @
dafbc8c0
{% extends 'app/base_reset.html' %}
{% block title %}Reset Password{% endblock%}
{% block content %}
<h1>
Reset Password
</h1>
<br/><br/>
<p>
Forgotten your password ? Enter email address below, and we'll email instructions for setting a new one.
</p>
<div
class =
"from-group"
>
<form
method=
"POST"
>
{% csrf_token %}
{{ form.as_p }}
<button
class=
"btn btn-secondary"
>
Submit
</button>
</form>
</div>
{% endblock %}
\ No newline at end of file
app/templates/password_reset_done.html
0 → 100644
View file @
dafbc8c0
{% extends 'app/base_reset.html' %}
{% block title %}Password reset complete{% endblock%}
{% block content %}
<h1>
Password reset complete
</h1>
<br/><br/>
<p>
Your password has been set. You may go ahead and log in now.
</p>
<a
href=
'/login'
>
Log in
</a>
{% endblock %}
\ No newline at end of file
app/templates/password_reset_form.html
0 → 100644
View file @
dafbc8c0
{% extends 'app/base_reset.html' %}
{% block title %}Enter new password{% endblock%}
{% block content %}
<h1>
Enter new password
</h1>
<br/><br/>
<div
class =
"from-group"
>
<form
method=
"POST"
>
{% csrf_token %}
{{ form.as_p }}
<button
class=
"btn btn-secondary"
>
Update Password
</button>
</form>
</div>
{% endblock %}
\ No newline at end of file
app/templates/password_reset_sent.html
0 → 100644
View file @
dafbc8c0
{% extends 'app/base_reset.html' %}
{% block title %}Password reset sent{% endblock%}
{% block content %}
<h1>
Password reset sent
</h1>
<br/><br/>
<p>
We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.
</p>
<br/>
<p>
If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.
</p>
{% endblock %}
\ No newline at end of file
app/urls.py
View file @
dafbc8c0
...
...
@@ -41,4 +41,16 @@ urlpatterns = [
path
(
"password_success/"
,
views
.
password_success
,
name
=
"password_success"
),
path
(
"given-rating/"
,
views
.
see_given_rating
,
name
=
"see_given_rating"
),
path
(
"submit-visitor/"
,
SubmitVisitorView
.
as_view
(),
name
=
"submit-visitor"
),
path
(
"reset_password/"
,
auth_views
.
PasswordResetView
.
as_view
(
template_name
=
"password_reset.html"
),
name
=
"reset_password"
),
path
(
"reset_password_sent/"
,
auth_views
.
PasswordResetDoneView
.
as_view
(
template_name
=
"password_reset_sent.html"
),
name
=
"password_reset_done"
),
path
(
"reset/<uidb64>/<token>/"
,
auth_views
.
PasswordResetConfirmView
.
as_view
(
template_name
=
"password_reset_form.html"
),
name
=
"password_reset_confirm"
),
path
(
"reset_password_complete/"
,
auth_views
.
PasswordResetCompleteView
.
as_view
(
template_name
=
"password_reset_done.html"
),
name
=
"password_reset_complete"
),
]
authentication/migrations/0009_user_is_email_verified.py
0 → 100644
View file @
dafbc8c0
# Generated by Django 3.1 on 2020-10-30 16:27
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'authentication'
,
'0008_user_is_subscribing_to_material_comments'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'user'
,
name
=
'is_email_verified'
,
field
=
models
.
BooleanField
(
default
=
False
),
),
]
authentication/templates/login.html
View file @
dafbc8c0
...
...
@@ -65,6 +65,10 @@
Belum mendaftar? klik di sini
</a>
<br>
<a
href=
"/reset_password"
class=
"txt1"
>
Lupa password? klik di sini
</a>
<br>
<a
href=
"/registrasi"
class=
"txt1"
>
Ingin jadi kontributor? klik di sini
</a>
...
...
digipus/__pycache__/settings.cpython-36.pyc
View file @
dafbc8c0
No preview for this file type
register/migrations/0001_initial.py
0 → 100644
View file @
dafbc8c0
# Generated by Django 3.1 on 2020-10-30 16:27
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
uuid
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'EmailVerification'
,
fields
=
[
(
'token'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
primary_key
=
True
,
serialize
=
False
)),
(
'created_on'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'expire_on'
,
models
.
DateTimeField
(
null
=
True
)),
(
'user'
,
models
.
ForeignKey
(
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
),
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment