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
d9bb2868
Commit
d9bb2868
authored
Jul 22, 2014
by
Ned Batchelder
Committed by
Anurag Ramdasan
Jul 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a view that can show us what URL params we got
parent
f77c06ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
lms/djangoapps/debug/views.py
+13
-0
lms/urls.py
+4
-0
No files found.
lms/djangoapps/debug/views.py
View file @
d9bb2868
...
@@ -10,6 +10,9 @@ from edxmako.shortcuts import render_to_response
...
@@ -10,6 +10,9 @@ from edxmako.shortcuts import render_to_response
from
codejail.safe_exec
import
safe_exec
from
codejail.safe_exec
import
safe_exec
from
util.json_request
import
JsonResponse
@login_required
@login_required
@ensure_csrf_cookie
@ensure_csrf_cookie
def
run_python
(
request
):
def
run_python
(
request
):
...
@@ -29,3 +32,13 @@ def run_python(request):
...
@@ -29,3 +32,13 @@ def run_python(request):
else
:
else
:
c
[
'results'
]
=
pprint
.
pformat
(
g
)
c
[
'results'
]
=
pprint
.
pformat
(
g
)
return
render_to_response
(
"debug/run_python_form.html"
,
c
)
return
render_to_response
(
"debug/run_python_form.html"
,
c
)
@login_required
def
show_parameters
(
request
):
"""A page that shows what GET parameters were on the URL."""
params
=
{
'get'
:
dict
(
request
.
GET
),
'post'
:
dict
(
request
.
POST
),
}
return
JsonResponse
(
params
)
lms/urls.py
View file @
d9bb2868
...
@@ -481,6 +481,10 @@ if settings.FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'):
...
@@ -481,6 +481,10 @@ if settings.FEATURES.get('ENABLE_DEBUG_RUN_PYTHON'):
url
(
r'^debug/run_python'
,
'debug.views.run_python'
),
url
(
r'^debug/run_python'
,
'debug.views.run_python'
),
)
)
urlpatterns
+=
(
url
(
r'^debug/show_parameters'
,
'debug.views.show_parameters'
),
)
# Crowdsourced hinting instructor manager.
# Crowdsourced hinting instructor manager.
if
settings
.
FEATURES
.
get
(
'ENABLE_HINTER_INSTRUCTOR_VIEW'
):
if
settings
.
FEATURES
.
get
(
'ENABLE_HINTER_INSTRUCTOR_VIEW'
):
urlpatterns
+=
(
urlpatterns
+=
(
...
...
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