Skip to content

Instantly share code, notes, and snippets.

@cezar77
Created August 28, 2014 08:35
Show Gist options
  • Select an option

  • Save cezar77/fde63e12479112c40d73 to your computer and use it in GitHub Desktop.

Select an option

Save cezar77/fde63e12479112c40d73 to your computer and use it in GitHub Desktop.
Django REST Framework 2.3.14 - rendered HTML with <span class="meta nocode">
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="NONE,NOARCHIVE" />
<title>Django REST framework</title>
<link rel="stylesheet" type="text/css" href="/static/rest_framework/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="/static/rest_framework/css/bootstrap-tweaks.css"/>
<link rel="stylesheet" type="text/css" href="/static/rest_framework/css/prettify.css"/>
<link rel="stylesheet" type="text/css" href="/static/rest_framework/css/default.css"/>
</head>
<body class=" container">
<div class="wrapper">
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container-fluid">
<span>
<a class='brand' rel="nofollow" href='http://www.django-rest-framework.org'>
Django REST framework <span class="version">2.3.14</span>
</a>
</span>
<ul class="nav pull-right">
<li><a href='/api-auth/login/?next=/snippets/'>Log in</a></li>
</ul>
</div>
</div>
</div>
<ul class="breadcrumb">
<li>
<a href="/" >
Api Root
</a>
<span class="divider">&rsaquo;</span>
</li>
<li>
<a href="/snippets/" class="active">
Snippet List
</a>
</li>
</ul>
<!-- Content -->
<div id="content">
<form id="get-form" class="pull-right">
<fieldset>
<div class="btn-group format-selection">
<a class="btn btn-primary js-tooltip" href='/snippets/'
rel="nofollow" title="Make a GET request on the Snippet List resource">GET</a>
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown"
title="Specify a format for the GET request">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>
<a class="js-tooltip format-option"
href='/snippets/?format=json'
rel="nofollow"
title="Make a GET request on the Snippet List resource with the format set to `json`">
json
</a>
</li>
<li>
<a class="js-tooltip format-option"
href='/snippets/?format=api'
rel="nofollow"
title="Make a GET request on the Snippet List resource with the format set to `api`">
api
</a>
</li>
</ul>
</div>
</fieldset>
</form>
<form class="button-form" action="/snippets/" method="POST">
<input type='hidden' name='csrfmiddlewaretoken' value='6ohGL5OGIJH6tiicxwq2RuKqgcnbmpoW' />
<input type="hidden" name="_method" value="OPTIONS" />
<button class="btn btn-primary js-tooltip"
title="Make an OPTIONS request on the Snippet List resource">OPTIONS</button>
</form>
<div class="content-main">
<div class="page-header">
<h1>Snippet List</h1>
</div>
<p>This viewset automatically provides <code>list</code>, <code>create</code>, <code>retrieve</code>,
<code>update</code> and <code>destroy</code> actions.</p>
<p>Additionally we also provide an extra <code>highlight</code> action.</p>
<div class="request-info" style="clear: both" >
<pre class="prettyprint"><b>GET</b> /snippets/</pre>
</div>
<div class="response-info">
<pre class="prettyprint"><span class="meta nocode"><b>HTTP 200 OK</b>
<b>Content-Type:</b> <span class="lit">application/json</span>
<b>Vary:</b> <span class="lit">Accept</span>
<b>Allow:</b> <span class="lit">GET, POST, HEAD, OPTIONS</span>
</span>{
&quot;count&quot;: 3,
&quot;next&quot;: null,
&quot;previous&quot;: null,
&quot;results&quot;: [
{
&quot;url&quot;: &quot;<a href="http://localhost:8080/snippets/1/" rel="nofollow">http://localhost:8080/snippets/1/</a>&quot;,
&quot;highlight&quot;: &quot;<a href="http://localhost:8080/snippets/1/highlight/" rel="nofollow">http://localhost:8080/snippets/1/highlight/</a>&quot;,
&quot;owner&quot;: &quot;admin&quot;,
&quot;title&quot;: &quot;Hello, world!&quot;,
&quot;code&quot;: &quot;print &#39;Hello, world!&#39;&quot;,
&quot;linenos&quot;: false,
&quot;language&quot;: &quot;python&quot;,
&quot;style&quot;: &quot;colorful&quot;
},
{
&quot;url&quot;: &quot;<a href="http://localhost:8080/snippets/2/" rel="nofollow">http://localhost:8080/snippets/2/</a>&quot;,
&quot;highlight&quot;: &quot;<a href="http://localhost:8080/snippets/2/highlight/" rel="nofollow">http://localhost:8080/snippets/2/highlight/</a>&quot;,
&quot;owner&quot;: &quot;admin&quot;,
&quot;title&quot;: &quot;Hallo Welt!&quot;,
&quot;code&quot;: &quot;print &#39;Hallo Welt!&#39;&quot;,
&quot;linenos&quot;: false,
&quot;language&quot;: &quot;python&quot;,
&quot;style&quot;: &quot;friendly&quot;
},
{
&quot;url&quot;: &quot;<a href="http://localhost:8080/snippets/3/" rel="nofollow">http://localhost:8080/snippets/3/</a>&quot;,
&quot;highlight&quot;: &quot;<a href="http://localhost:8080/snippets/3/highlight/" rel="nofollow">http://localhost:8080/snippets/3/highlight/</a>&quot;,
&quot;owner&quot;: &quot;admin&quot;,
&quot;title&quot;: &quot;Exchange values of 2 variables&quot;,
&quot;code&quot;: &quot;var a, b\r\nvar c = a\r\na = b\r\nb = c&quot;,
&quot;linenos&quot;: true,
&quot;language&quot;: &quot;js&quot;,
&quot;style&quot;: &quot;colorful&quot;
}
]
}</pre>
</div>
</div>
</div>
<!-- END Content -->
<footer>
<p>Sponsored by <a href="http://dabapps.com/">DabApps</a>.</p>
</footer>
</div><!-- ./wrapper -->
<script src="/static/rest_framework/js/jquery-1.8.1-min.js"></script>
<script src="/static/rest_framework/js/bootstrap.min.js"></script>
<script src="/static/rest_framework/js/prettify-min.js"></script>
<script src="/static/rest_framework/js/default.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment