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
c0c0a7e2
Commit
c0c0a7e2
authored
Sep 10, 2013
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
be63a913
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
common/djangoapps/student/views.py
+11
-6
conf/locale/ru/LC_MESSAGES/django-partial.po
+0
-0
conf/locale/ru/LC_MESSAGES/django.po
+0
-0
No files found.
common/djangoapps/student/views.py
View file @
c0c0a7e2
...
...
@@ -32,6 +32,10 @@ from django.utils.http import base36_to_int
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext_lazy
from
django.views.decorators.http
import
require_POST
from
django.utils.functional
import
Promise
from
django.utils.encoding
import
force_unicode
from
django.utils.simplejson
import
JSONEncoder
from
django.utils.translation
import
get_language
from
ratelimitbackend.exceptions
import
RateLimitException
...
...
@@ -443,6 +447,7 @@ def login_user(request, error=""):
# doesn't exist, and doesn't have a corresponding password
if
username
!=
""
:
AUDIT_LOG
.
warning
(
u"Login failed - password for {0} is invalid"
.
format
(
email
))
AUDIT_LOG
.
warning
(
get_language
())
return
HttpResponse
(
json
.
dumps
({
'success'
:
False
,
'value'
:
ugettext_lazy
(
'Email or password is incorrect.'
)},
cls
=
LazyEncoder
))
...
...
@@ -1385,12 +1390,12 @@ def change_email_settings(request):
return
HttpResponse
(
json
.
dumps
({
'success'
:
True
}))
class
LazyEncoder
(
json
.
JSONEncoder
):
"""Encodes django's lazy i18n strings.
Used to serialize translated strings to JSON, because
simplejson chokes on it otherwise.
"""
class
LazyEncoder
(
JSONEncoder
):
"""Encodes django's lazy i18n strings.
Used to serialize translated strings to JSON, because
simplejson chokes on it otherwise.
"""
def
default
(
self
,
obj
):
if
isinstance
(
obj
,
Promise
):
return
force_unicode
(
obj
)
return
obj
return
super
(
LazyEncoder
,
self
)
.
default
(
obj
)
conf/locale/ru/LC_MESSAGES/django-partial.po
View file @
c0c0a7e2
This diff is collapsed.
Click to expand it.
conf/locale/ru/LC_MESSAGES/django.po
View file @
c0c0a7e2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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