Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
3379a870
Commit
3379a870
authored
Jun 12, 2012
by
Sofia Papagiannaki
Browse files
fix local login from cms
parent
5f0086d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/target/local.py
View file @
3379a870
...
...
@@ -37,6 +37,7 @@ from django.template import RequestContext
from
django.contrib.auth
import
authenticate
from
django.contrib
import
messages
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators.csrf
import
csrf_exempt
from
astakos.im.util
import
prepare_response
from
astakos.im.views
import
requires_anonymous
...
...
@@ -49,6 +50,7 @@ from ratelimit.decorators import ratelimit
retries
=
RATELIMIT_RETRIES_ALLOWED
-
1
rate
=
str
(
retries
)
+
'/m'
@
csrf_exempt
@
requires_anonymous
@
ratelimit
(
field
=
'username'
,
method
=
'POST'
,
rate
=
rate
)
def
login
(
request
,
on_failure
=
'im/login.html'
):
...
...
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