{% extends "base/page.html" %} {% block page_title %}API Tester{% endblock %} {% block style_links %} {% endblock %} {% block script_links %} {% endblock %} {% block extra_styles %} {{ block.super }} label { width: 150px; } form .input { margin-left: 160px; } {% endblock %} {% block pageload_scripts %} $('#send').click(function(){ /*params = {}; $('#responseJSON').html(''); $.each($('#params input:text'), function(){ params[$(this).attr('id')] = $(this).val(); }); $.each($('#params input:checkbox'), function(){ params[$(this).attr('id')] = $(this).attr('checked'); }); $.each($('#params select'), function(){ params[$(this).attr('id')] = $(this).val(); });*/ var params = $("#the_form").serialize() $.ajax({ type: "GET", url: $('#url').html(), contentType : "text/json", data: params, success: function(data,status,xhr){ $('#responseJSON') .html('URL requested: ' + $('#url').html() + '?' + params + '\n\n' + 'Http Status Code: ' + xhr.status + '\n\n' + JSON.stringify(data, null, 4)); }, error: function(xhr, status, error){ $('#responseJSON') .html('URL requested: ' + $('#url').html() + '?' + params + '\n\n' + 'Http Status Code: ' + xhr.status + ' ' + error + '\n\n' + 'An error was encountered. Please check your URL and parameter ' + 'values and try again.\n\nURL: ' + $('#url').html() + '\n\nParameters: ' + JSON.stringify(params) ); }, dataType: "json" }); }); $("#print_id").autocomplete( "/print/auto-complete/", { multiple: false, width: 300, minChars: 1, matchContains: true, matchSubset: false, mustMatch: false, selectFirst: false } ); $("#search_text").autocomplete( "/profile/get-contacts/", { multiple: true, width: 300, minChars: 1, matchContains: true, matchSubset: false, mustMatch: false, selectFirst: false } ); {% endblock %} {% block left_pane %}

Index

Projects

Prints

Groups
Media
Users
{% endblock %} {% block main_content %}

Request

//localground.org{{post_url}}
{% if user.is_superuser %}
{% endif %} {% if groups %}
{% endif %} {% for field in test_fields %}
{% if field.type == 'text' %} {{field.desc}} {% endif %} {% if field.type == 'bool' %} {{field.desc}} {% endif %}
{% endfor %}

Response


		
{% endblock %} Local Ground - Twitter Layout Sample