Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
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
django-rest-framework
Commits
ab9621ed
Commit
ab9621ed
authored
Sep 09, 2012
by
Alec Perkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add prettify syntax highlighting to resource info.
parent
8c0bd39f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
djangorestframework/static/djangorestframework/css/prettify.css
+31
-0
djangorestframework/static/djangorestframework/js/prettify-min.js
+0
-0
djangorestframework/templates/djangorestframework/base.html
+8
-5
No files found.
djangorestframework/static/djangorestframework/css/prettify.css
0 → 100644
View file @
ab9621ed
.com
{
color
:
#93a1a1
;
}
.lit
{
color
:
#195f91
;
}
.pun
,
.opn
,
.clo
{
color
:
#93a1a1
;
}
.fun
{
color
:
#dc322f
;
}
.str
,
.atv
{
color
:
#D14
;
}
.kwd
,
.prettyprint
.tag
{
color
:
#1e347b
;
}
.typ
,
.atn
,
.dec
,
.var
{
color
:
teal
;
}
.pln
{
color
:
#48484c
;
}
.prettyprint
{
padding
:
8px
;
background-color
:
#f7f7f9
;
border
:
1px
solid
#e1e1e8
;
}
.prettyprint.linenums
{
-webkit-box-shadow
:
inset
40px
0
0
#fbfbfc
,
inset
41px
0
0
#ececf0
;
-moz-box-shadow
:
inset
40px
0
0
#fbfbfc
,
inset
41px
0
0
#ececf0
;
box-shadow
:
inset
40px
0
0
#fbfbfc
,
inset
41px
0
0
#ececf0
;
}
/* Specify class=linenums on a pre to get line numbering */
ol
.linenums
{
margin
:
0
0
0
33px
;
/* IE indents via margin-left */
}
ol
.linenums
li
{
padding-left
:
12px
;
color
:
#bebec5
;
line-height
:
20px
;
text-shadow
:
0
1px
0
#fff
;
}
\ No newline at end of file
djangorestframework/static/djangorestframework/js/prettify-min.js
0 → 100644
View file @
ab9621ed
This diff is collapsed.
Click to expand it.
djangorestframework/templates/djangorestframework/base.html
View file @
ab9621ed
...
...
@@ -13,6 +13,7 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% get_static_prefix %}djangorestframework/css/bootstrap.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{% get_static_prefix %}djangorestframework/css/bootstrap-tweaks.css"
/>
{% endblock %}
<link
rel=
"stylesheet"
type=
"text/css"
href=
'{% get_static_prefix %}djangorestframework/css/prettify.css'
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
'{% get_static_prefix %}djangorestframework/css/style.css'
/>
{% block extrastyle %}{% endblock %}
...
...
@@ -108,14 +109,13 @@
<p
class=
"resource-description"
>
{{ description }}
</p>
<div
class=
"request-info"
>
<pre><b>
{{ request.method }}
</b>
{{ request.get_full_path }}
</pre>
<pre
class=
"prettyprint"
><b>
{{ request.method }}
</b>
{{ request.get_full_path }}
</pre>
<div>
<div
class=
"response-info"
>
<pre
><div
class=
"meta
"
><b>
HTTP {{ response.status_code }} {{ response.status_text }}
</b>
{% autoescape off %}
{% for key, val in response.items %}
<b>
{{ key }}:
</b>
{{ val|urlize_quoted_links }}
<pre
class=
"prettyprint"
><div
class=
"meta nocode
"
><b>
HTTP {{ response.status_code }} {{ response.status_text }}
</b>
{% autoescape off %}
{% for key, val in response.items %}
<b>
{{ key }}:
</b>
<span
class=
"lit"
>
{{ val|urlize_quoted_links }}
</span>
{% endfor %}
</div>
{{ content|urlize_quoted_links }}
</pre>
{% endautoescape %}
</div>
{{ content|urlize_quoted_links }}
</pre>
{% endautoescape %}
</div>
{% if response.status_code != 403 %}
...
...
@@ -197,7 +197,10 @@
</div>
<script
src=
"{% get_static_prefix %}djangorestframework/js/jquery-1.8.1-min.js"
></script>
<script
src=
"{% get_static_prefix %}djangorestframework/js/bootstrap.min.js"
></script>
<script
src=
"{% get_static_prefix %}djangorestframework/js/prettify-min.js"
></script>
<script>
prettyPrint
();
$
(
'.js-tooltip'
).
tooltip
({
delay
:
1000
});
...
...
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