Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
33f79fca
Commit
33f79fca
authored
Feb 05, 2016
by
Mathieu Rodic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] re-implemented authentication
parent
b35e1b64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
auth.py
gargantext/views/pages/auth.py
+2
-2
login.html
templates/pages/auth/login.html
+1
-2
No files found.
gargantext/views/pages/auth.py
View file @
33f79fca
...
@@ -28,11 +28,11 @@ def login(request):
...
@@ -28,11 +28,11 @@ def login(request):
# /!\ pass is sent clear in POST data
# /!\ pass is sent clear in POST data
password
=
request
.
POST
[
'password'
]
password
=
request
.
POST
[
'password'
]
user
=
authenticate
(
username
=
username
,
password
=
password
)
user
=
auth
.
auth
enticate
(
username
=
username
,
password
=
password
)
if
user
is
not
None
:
if
user
is
not
None
:
if
user
.
is_active
:
if
user
.
is_active
:
login
(
request
,
user
)
auth
.
login
(
request
,
user
)
# if "next" forwarded from the GET via the template form
# if "next" forwarded from the GET via the template form
if
(
'the_next_page'
in
request
.
POST
):
if
(
'the_next_page'
in
request
.
POST
):
...
...
templates/pages/auth/login.html
View file @
33f79fca
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<div
id=
"grp-content-container"
>
<div
id=
"grp-content-container"
>
<div
class=
"g-d-c g-d-10 g-centered"
>
<div
class=
"g-d-c g-d-10 g-centered"
>
<form
action=
"
/auth/
"
method=
"post"
><input
type=
'hidden'
name=
'csrfmiddlewaretoken'
value=
'Yopwc8YatA3C68kSevZX9upoXdIcZzPn'
/>
<form
action=
""
method=
"post"
><input
type=
'hidden'
name=
'csrfmiddlewaretoken'
value=
'Yopwc8YatA3C68kSevZX9upoXdIcZzPn'
/>
<fieldset
class=
"grp-module grp-module-login"
>
<fieldset
class=
"grp-module grp-module-login"
>
<h2>
<h2>
<span
class=
"grp-current-page"
>
Login
</span>
<span
class=
"grp-current-page"
>
Login
</span>
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
{% block main %}
{% block main %}
<div
id=
"login"
>
<div
id=
"login"
>
<form
class=
"form-horizontal"
name=
"LoginForm"
action=
"/auth/"
method=
"post"
>
{% csrf_token %}
{% csrf_token %}
{% if next_page %}
{% if next_page %}
<input
type=
"hidden"
name=
"the_next_page"
value=
"{{ next_page }}"
/>
<input
type=
"hidden"
name=
"the_next_page"
value=
"{{ next_page }}"
/>
...
...
Write
Preview
Markdown
is supported
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