Skip to content

Instantly share code, notes, and snippets.

@cezar77
Created August 25, 2014 14:41
Show Gist options
  • Select an option

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

Select an option

Save cezar77/20bc006c44089be8e32a to your computer and use it in GitHub Desktop.
Django REST Framework - proposal for 3.x - rendered HTML
<!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 href="/">
<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=/'>Log in</a></li>
</ul>
</div>
</div>
</div>
<ul class="breadcrumb">
<li>
<a href="/" class="active">
Api Root
</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='/'
rel="nofollow" title="Make a GET request on the Api Root 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='/?format=json'
rel="nofollow"
title="Make a GET request on the Api Root resource with the format set to `json`">
json
</a>
</li>
<li>
<a class="js-tooltip format-option"
href='/?format=api'
rel="nofollow"
title="Make a GET request on the Api Root resource with the format set to `api`">
api
</a>
</li>
</ul>
</div>
</fieldset>
</form>
<form class="button-form" action="/" method="POST">
<input type='hidden' name='csrfmiddlewaretoken' value='t3CeHWVSFMIhy0hzu9QBpLDdv4gFawHN' />
<input type="hidden" name="_method" value="OPTIONS" />
<button class="btn btn-primary js-tooltip"
title="Make an OPTIONS request on the Api Root resource">
OPTIONS
</button>
</form>
<div class="content-main">
<div class="page-header">
<h1>Api Root</h1>
</div>
<div class="request-info" style="clear: both" >
<pre class="prettyprint"><b>GET</b> /</pre>
</div>
<div class="response-info">
<pre class="prettyprint"><div 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, HEAD, OPTIONS</span>
</div>{
&quot;users&quot;: &quot;<a href="http://localhost:8080/users/" rel="nofollow">http://localhost:8080/users/</a>&quot;,
&quot;snippets&quot;: &quot;<a href="http://localhost:8080/snippets/" rel="nofollow">http://localhost:8080/snippets/</a>&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