forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom csrf view openedx#1511 (openedx#1513)
- Loading branch information
1 parent
c3817d5
commit 629bf80
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<%! | ||
from django.utils.translation import ugettext as _ | ||
%> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>403 Forbidden</title> | ||
<style type="text/css"> | ||
.login-register .status .message-copy li { | ||
margin: 0; | ||
list-style: none; | ||
} | ||
#summary { | ||
background: #ffc; | ||
padding: 10px; | ||
} | ||
#summary ol li { | ||
list-style-type: decimal; | ||
} | ||
#summary ol li:not(:first-child) { | ||
margin-top: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="summary"> | ||
<p>${_("The sign in errors are caused by communication line or your browser settings. Please try following method.")}</p> | ||
<ol> | ||
<li>${_("Close your browser screen once and sign in again after a while. Also confirm a connection state of your communication line.")}</li> | ||
<li>${_("Enabling cookie support on your browser.")}</li> | ||
</ol> | ||
<p>${_("If not resolve your sign in problem, please try other browser.")}</p> | ||
</div> | ||
</body> | ||
</html> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
""" | ||
Views for ga_csrf | ||
""" | ||
from django.http import HttpResponseForbidden | ||
|
||
from edxmako.shortcuts import render_to_response | ||
|
||
|
||
def csrf_failure(request, reason=''): # pylint: disable=unused-argument | ||
return HttpResponseForbidden(render_to_response('ga_csrf_failure.html')) |