Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
23c3c5a6
Commit
23c3c5a6
authored
Aug 02, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print -> log.debug, rename function from camel case
parent
727e5141
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common/djangoapps/external_auth/views.py
+4
-4
No files found.
common/djangoapps/external_auth/views.py
View file @
23c3c5a6
...
...
@@ -35,16 +35,16 @@ log = logging.getLogger("mitx.external_auth")
@csrf_exempt
def
default_render_failure
(
request
,
message
,
status
=
403
,
template_name
=
'extauth_failure.html'
,
exception
=
None
):
"""Render an Openid error page to the user."""
message
=
"In openid_failure "
+
message
print
"in openid_failure: "
log
.
debug
(
message
)
data
=
render_to_string
(
template_name
,
dict
(
message
=
message
,
exception
=
exception
))
return
HttpResponse
(
data
,
status
=
status
)
#-----------------------------------------------------------------------------
# Openid
def
GenPasswd
(
length
=
12
,
chars
=
string
.
letters
+
string
.
digits
):
def
edXauth_generate_password
(
length
=
12
,
chars
=
string
.
letters
+
string
.
digits
):
"""Generate internal password for externally authenticated user"""
return
''
.
join
([
random
.
choice
(
chars
)
for
i
in
range
(
length
)])
@csrf_exempt
...
...
@@ -94,7 +94,7 @@ def edXauth_external_login_or_signup(request, external_id, external_domain, cred
)
eamap
.
external_email
=
email
eamap
.
external_name
=
fullname
eamap
.
internal_password
=
GenPassw
d
()
eamap
.
internal_password
=
edXauth_generate_passwor
d
()
log
.
debug
(
'created eamap=
%
s'
%
eamap
)
eamap
.
save
()
...
...
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