Untitled
raw download clone
TEXT
views 29
,
size 10211 b
<!DOCTYPE html>
<html>
  <head>
    

      
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="robots" content="NONE,NOARCHIVE" />
      

      <title>Item List – 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="">

    <div class="wrapper">
      
        <div class="navbar navbar-static-top navbar-inverse"
             role="navigation" aria-label="navbar">
          <div class="container">
            <span>
              
                <a class='navbar-brand' rel="nofollow" href='https://www.django-rest-framework.org/'>
                    Django REST framework
                </a>
              
            </span>
            <ul class="nav navbar-nav pull-right">
              
                
                  
                
              
            </ul>
          </div>
        </div>
      

      <div class="container">
        
          <ul class="breadcrumb">
            
              
                <li><a href="/api/">Api Root</a></li>
              
            
              
                <li class="active"><a href="/api/items/">Item List</a></li>
              
            
          </ul>
        

        <!-- Content -->
        <div id="content" role="main" aria-label="content">
          

          <div class="region"  aria-label="request form">
          
          
          
            <form id="get-form" class="pull-right">
              <fieldset>
                
                  <div class="btn-group format-selection">
                    <a class="btn btn-primary js-tooltip" href="/api/items/" rel="nofollow" title="Make a GET request on the Item 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="/api/items/?format=json" rel="nofollow" title="Make a GET request on the Item List resource with the format set to `json`">json</a>
                        </li>
                      
                        <li>
                          <a class="js-tooltip format-option" href="/api/items/?format=api" rel="nofollow" title="Make a GET request on the Item List resource with the format set to `api`">api</a>
                        </li>
                      
                    </ul>
                  </div>
                
              </fieldset>
            </form>
          

          
            <form class="button-form" action="/api/items/" data-method="OPTIONS">
              <button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the Item List resource">OPTIONS</button>
            </form>
          

          

          

          

          
          </div>

            <div class="content-main" role="main"  aria-label="main content">
              <div class="page-header">
                <h1>Item List</h1>
              </div>
              <div style="float:left">
                
                  <p></p>
                
              </div>

              

              <div class="request-info" style="clear: both" aria-label="request info">
                <pre class="prettyprint"><b>GET</b> /api/items/</pre>
              </div>

              <div class="response-info" aria-label="response info">
                <pre class="prettyprint"><span class="meta nocode"><b>HTTP 200 OK</b>
<b>Allow:</b> <span class="lit">GET, POST, HEAD, OPTIONS</span>
<b>Content-Type:</b> <span class="lit">application/json</span>
<b>Vary:</b> <span class="lit">Accept</span>

</span>[
    {
        &quot;id&quot;: 1,
        &quot;name&quot;: &quot;Milk&quot;,
        &quot;description&quot;: &quot;Milk skimmed&quot;,
        &quot;image&quot;: &quot;<a href="http://104.248.135.45:3000/media/photos/%25%20Y/%25%20m/%25%20d/skimmed.jpg" rel="nofollow">http://104.248.135.45:3000/media/photos/%25%20Y/%25%20m/%25%20d/skimmed.jpg</a>&quot;,
        &quot;created_at&quot;: &quot;2020-05-05T01:10:35.450836Z&quot;
    },
    {
        &quot;id&quot;: 2,
        &quot;name&quot;: &quot;Eggs&quot;,
        &quot;description&quot;: &quot;Normal Eggs&quot;,
        &quot;image&quot;: &quot;<a href="http://104.248.135.45:3000/media/photos/%25%20Y/%25%20m/%25%20d/eggs.jpg" rel="nofollow">http://104.248.135.45:3000/media/photos/%25%20Y/%25%20m/%25%20d/eggs.jpg</a>&quot;,
        &quot;created_at&quot;: &quot;2020-05-05T01:13:45.184173Z&quot;
    }
]</pre>
              </div>
            </div>

            
              
                <div class="tabbable">
                  
                    <ul class="nav nav-tabs form-switcher">
                      <li>
                        <a name='html-tab' href="#post-object-form" data-toggle="tab">HTML form</a>
                      </li>
                      <li>
                        <a name='raw-tab' href="#post-generic-content-form" data-toggle="tab">Raw data</a>
                      </li>
                    </ul>
                  

                  <div class="well tab-content">
                    
                      <div class="tab-pane" id="post-object-form">
                        
                          <form action="/api/items/" method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
                            <fieldset>
                              <input type="hidden" name="csrfmiddlewaretoken" value="oe5t9NC0wgyEZ0ohxgymzQy8uIRPy0HURs3iKuy9J6084JMX462oNYbyyzQOwDNI">
                              

  

  
    <div class="form-group ">
  
    <label class="col-sm-2 control-label ">
      Name
    </label>
  

  <div class="col-sm-10">
    <input name="name" class="form-control" type="text"  value="" >

    

    
  </div>
</div>

  

  
    <div class="form-group ">
  
    <label class="col-sm-2 control-label ">
      Description
    </label>
  

  <div class="col-sm-10">
    <textarea name="description" class="form-control"  ></textarea>

    

    
  </div>
</div>

  

  
    <div class="form-group ">
  
    <label class="col-sm-2 control-label ">
      Image
    </label>
  

  <div class="col-sm-10">
    <input name="image"  type="file"  value="" >

    

    
  </div>
</div>

  

  


                              <div class="form-actions">
                                <button class="btn btn-primary js-tooltip" title="Make a POST request on the Item List resource">POST</button>
                              </div>
                            </fieldset>
                          </form>
                        
                      </div>
                    

                    <div class="tab-pane" id="post-generic-content-form">
                      
                        <form action="/api/items/" method="POST" class="form-horizontal">
                          <fieldset>
                            


  <div class="form-group">
    <label for="id__content_type" class="col-sm-2 control-label">Media type:</label>
    <div class="col-sm-10">
      <select name="_content_type" data-override="content-type" id="id__content_type" class="form-control">
  <option value="application/json" selected>application/json</option>

  <option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>

  <option value="multipart/form-data">multipart/form-data</option>

</select>
      <span class="help-block"></span>
    </div>
  </div>

  <div class="form-group">
    <label for="id__content" class="col-sm-2 control-label">Content:</label>
    <div class="col-sm-10">
      <textarea name="_content" cols="40" rows="10" data-override="content" id="id__content" class="form-control">
{
    &quot;name&quot;: &quot;&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;image&quot;: null
}</textarea>
      <span class="help-block"></span>
    </div>
  </div>


                            <div class="form-actions">
                              <button class="btn btn-primary js-tooltip" title="Make a POST request on the Item List resource">POST</button>
                            </div>
                          </fieldset>
                        </form>
                      
                    </div>
                  </div>
                </div>
              

              
            
          
        </div><!-- /.content -->
      </div><!-- /.container -->
    </div><!-- ./wrapper -->

    

    
      <script>
        window.drf = {
          csrfHeaderName: "X-CSRFTOKEN",
          csrfToken: "oe5t9NC0wgyEZ0ohxgymzQy8uIRPy0HURs3iKuy9J6084JMX462oNYbyyzQOwDNI"
        };
      </script>
      <script src="/static/rest_framework/js/jquery-3.4.1.min.js"></script>
      <script src="/static/rest_framework/js/ajax-form.js"></script>
      <script src="/static/rest_framework/js/csrf.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>
      <script>
        $(document).ready(function() {
          $('form').ajaxForm();
        });
      </script>
    

  </body>
  
</html>
close fullscreen
Login or Register to edit or fork this paste. It's free.