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
Collection of Practice
2019
1506757352-practice
Commits
6f7ae146
Commit
6f7ae146
authored
Nov 12, 2019
by
Syahrul Ardiansyah
Browse files
change formatting
parent
242d6450
Pipeline
#24541
passed with stage
in 1 minute and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
6f7ae146
image
:
django:
python2
image
:
django:
latest
before_script
:
-
apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev
...
...
accounts/views.py
View file @
6f7ae146
...
...
@@ -11,10 +11,10 @@ def send_login_email(request):
email
=
request
.
POST
[
'email'
]
uid
=
str
(
uuid
.
uuid4
())
Token
.
objects
.
create
(
email
=
email
,
uid
=
uid
)
url
=
request
.
build_absolute_uri
(
f
'/accounts/login?uid=
{
uid
}
'
)
url
=
request
.
build_absolute_uri
(
'/accounts/login?uid=
%s'
%
uid
)
send_mail
(
'Your login link for Superlists'
,
f
'Use this link to log in:
\n\n
{
url
}
'
,
'Use this link to log in:
\n\n
%s'
%
url
,
'noreply@superlists'
,
[
email
],
)
...
...
@@ -22,7 +22,6 @@ def send_login_email(request):
def
login
(
request
):
print
(
'login view'
,
file
=
sys
.
stderr
)
uid
=
request
.
GET
.
get
(
'uid'
)
user
=
authenticate
(
uid
=
uid
)
if
user
is
not
None
:
...
...
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