mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Consistent 2 space tabbing and formatting
This commit is contained in:
parent
e368986fcf
commit
5e917789ec
|
@ -57,12 +57,10 @@
|
||||||
<body onload="prettyPrint()" class="{% if current_page and current_page.is_homepage %}index{% endif %}-page">
|
<body onload="prettyPrint()" class="{% if current_page and current_page.is_homepage %}index{% endif %}-page">
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
{% include "nav.html" %}
|
{% include "nav.html" %}
|
||||||
|
|
||||||
<div class="body-content">
|
<div class="body-content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<!-- Search Modal -->
|
<!-- Search Modal -->
|
||||||
<div id="mkdocs_search_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div id="mkdocs_search_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -85,17 +83,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<!-- TODO
|
|
||||||
<p style="margin-top: -12px">
|
|
||||||
<a class="btn btn-mini btn-primary" style="width: 60px">« previous</a>
|
|
||||||
<a class="btn btn-mini btn-primary" style="float: right; margin-right: 8px; width: 60px;">next »</a>
|
|
||||||
</p>
|
|
||||||
-->
|
|
||||||
<div id="table-of-contents">
|
<div id="table-of-contents">
|
||||||
<ul class="nav nav-list side-nav well sidebar-nav-fixed">
|
<ul class="nav nav-list side-nav well sidebar-nav-fixed">
|
||||||
|
|
||||||
{% if current_page and current_page.is_homepage %}
|
{% if current_page and current_page.is_homepage %}
|
||||||
<li class="main">
|
<li class="main">
|
||||||
<a href="#">Django REST framework</a>
|
<a href="#">Django REST framework</a>
|
||||||
|
@ -103,7 +93,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for toc_item in toc %}
|
{% for toc_item in toc %}
|
||||||
|
|
||||||
<li class="{% if current_page and not current_page.is_homepage %}main{% endif %}">
|
<li class="{% if current_page and not current_page.is_homepage %}main{% endif %}">
|
||||||
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
|
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -113,7 +102,6 @@
|
||||||
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
|
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if current_page and current_page.is_homepage %}
|
{% if current_page and current_page.is_homepage %}
|
||||||
|
@ -122,16 +110,13 @@
|
||||||
<script type="text/javascript" src="//cdn.fusionads.net/fusion.js?zoneid=1332&serve=C6SDP2Y&placement=djangorestframework" id="_fusionads_js"></script>
|
<script type="text/javascript" src="//cdn.fusionads.net/fusion.js?zoneid=1332&serve=C6SDP2Y&placement=djangorestframework" id="_fusionads_js"></script>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main-content" class="span9">
|
<div id="main-content" class="span9">
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if meta.source %}
|
{% if meta.source %}
|
||||||
{% for filename in meta.source %}
|
{% for filename in meta.source %}
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/{{ filename }}">
|
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/{{ filename }}">
|
||||||
|
@ -141,20 +126,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</div>
|
</div> <!--/span-->
|
||||||
<!--/span-->
|
</div> <!--/row-->
|
||||||
</div>
|
</div> <!--/.fluid-container-->
|
||||||
<!--/row-->
|
</div> <!--/.body content-->
|
||||||
</div>
|
|
||||||
<!--/.fluid-container-->
|
|
||||||
</div>
|
|
||||||
<!--/.body content-->
|
|
||||||
<div id="push"></div>
|
<div id="push"></div>
|
||||||
</div>
|
</div> <!--/.wrapper -->
|
||||||
<!--/.wrapper -->
|
|
||||||
|
|
||||||
<footer class="span12">
|
<footer class="span12">
|
||||||
<p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</a>
|
<p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</a>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
|
@ -18,18 +18,18 @@
|
||||||
<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.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/bootstrap-tweaks.css" %}"/>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.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" %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<body class="{% block bodyclass %}{% endblock %}">
|
<body class="{% block bodyclass %}{% endblock %}">
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<div class="navbar navbar-static-top {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
|
<div class="navbar navbar-static-top {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -73,22 +73,15 @@
|
||||||
<form id="get-form" class="pull-right">
|
<form id="get-form" class="pull-right">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="btn-group format-selection">
|
<div class="btn-group format-selection">
|
||||||
<a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}'
|
<a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}' rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
|
||||||
rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
|
|
||||||
|
|
||||||
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown"
|
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown" title="Specify a format for the GET request">
|
||||||
title="Specify a format for the GET request">
|
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% for format in available_formats %}
|
{% for format in available_formats %}
|
||||||
<li>
|
<li>
|
||||||
<a class="js-tooltip format-option"
|
<a class="js-tooltip format-option" href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}' rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>
|
||||||
href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}'
|
|
||||||
rel="nofollow"
|
|
||||||
title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">
|
|
||||||
{{ format }}
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -101,8 +94,7 @@
|
||||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />
|
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />
|
||||||
<button class="btn btn-primary js-tooltip"
|
<button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>
|
||||||
title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>
|
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -110,8 +102,7 @@
|
||||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
<form class="button-form" action="{{ request.get_full_path }}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
||||||
<button class="btn btn-danger js-tooltip"
|
<button class="btn btn-danger js-tooltip" title="Make a DELETE request on the {{ name }} resource">DELETE</button>
|
||||||
title="Make a DELETE request on the {{ name }} resource">DELETE</button>
|
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -134,6 +125,7 @@
|
||||||
<div class="request-info" style="clear: both" >
|
<div class="request-info" style="clear: both" >
|
||||||
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="response-info">
|
<div class="response-info">
|
||||||
<pre class="prettyprint"><span class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
<pre class="prettyprint"><span class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
||||||
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
|
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
|
||||||
|
@ -156,31 +148,30 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="well tab-content">
|
<div class="well tab-content">
|
||||||
{% if post_form %}
|
{% if post_form %}
|
||||||
<div class="tab-pane" id="post-object-form">
|
<div class="tab-pane" id="post-object-form">
|
||||||
{% with form=post_form %}
|
{% with form=post_form %}
|
||||||
<form action="{{ request.get_full_path }}"
|
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
|
||||||
method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{ post_form }}
|
{{ post_form }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
||||||
title="Make a POST request on the {{ name }} resource">POST</button>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div {% if post_form %}class="tab-pane"{% endif %} id="post-generic-content-form">
|
<div {% if post_form %}class="tab-pane"{% endif %} id="post-generic-content-form">
|
||||||
{% with form=raw_data_post_form %}
|
{% with form=raw_data_post_form %}
|
||||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% include "rest_framework/raw_data_form.html" %}
|
{% include "rest_framework/raw_data_form.html" %}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
||||||
title="Make a POST request on the {{ name }} resource">POST</button>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
@ -202,22 +193,21 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="well tab-content">
|
<div class="well tab-content">
|
||||||
{% if put_form %}
|
{% if put_form %}
|
||||||
<div class="tab-pane" id="put-object-form">
|
<div class="tab-pane" id="put-object-form">
|
||||||
<form action="{{ request.get_full_path }}"
|
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
|
||||||
method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate>
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{ put_form }}
|
{{ put_form }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<button class="btn btn-primary js-tooltip"
|
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
||||||
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
|
||||||
value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div {% if put_form %}class="tab-pane"{% endif %} id="put-generic-content-form">
|
<div {% if put_form %}class="tab-pane"{% endif %} id="put-generic-content-form">
|
||||||
{% with form=raw_data_put_or_patch_form %}
|
{% with form=raw_data_put_or_patch_form %}
|
||||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||||
|
@ -225,14 +215,10 @@
|
||||||
{% include "rest_framework/raw_data_form.html" %}
|
{% include "rest_framework/raw_data_form.html" %}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
{% if raw_data_put_form %}
|
{% if raw_data_put_form %}
|
||||||
<button class="btn btn-primary js-tooltip"
|
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
||||||
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
|
||||||
value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if raw_data_patch_form %}
|
{% if raw_data_patch_form %}
|
||||||
<button class="btn btn-primary js-tooltip"
|
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PATCH" title="Make a PATCH request on the {{ name }} resource">PATCH</button>
|
||||||
name="{{ api_settings.FORM_METHOD_OVERRIDE }}"
|
|
||||||
value="PATCH" title="Make a PATCH request on the {{ name }} resource">PATCH</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -243,8 +229,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div><!-- /.content -->
|
||||||
<!-- END Content -->
|
|
||||||
</div><!-- /.container -->
|
</div><!-- /.container -->
|
||||||
</div><!-- ./wrapper -->
|
</div><!-- ./wrapper -->
|
||||||
|
|
||||||
|
@ -254,6 +239,6 @@
|
||||||
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
<script src="{% static "rest_framework/js/prettify-min.js" %}"></script>
|
||||||
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
<script src="{% static "rest_framework/js/default.js" %}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,9 +6,13 @@
|
||||||
{% if field.label %}{{ field.label }}{% endif %}
|
{% if field.label %}{{ field.label }}{% endif %}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
{% if style.inline %}
|
{% if style.inline %}
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
|
@ -20,9 +23,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<div class="form-group" style="border-bottom: 1px solid #e5e5e5">
|
<div class="form-group" style="border-bottom: 1px solid #e5e5e5">
|
||||||
<legend class="control-label col-sm-2 {% if style.hide_label %}sr-only{% endif %}" style="border-bottom: 0">{{ field.label }}</legend>
|
<legend class="control-label col-sm-2 {% if style.hide_label %}sr-only{% endif %}" style="border-bottom: 0">
|
||||||
|
{{ field.label }}
|
||||||
|
</legend>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for nested_field in field %}
|
{% for nested_field in field %}
|
||||||
{% if not nested_field.read_only %}
|
{% if not nested_field.read_only %}
|
||||||
{% render_field nested_field style=style %}
|
{% render_field nested_field style=style %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<form class="form-horizontal" role="form" action="." method="POST" novalidate>
|
<form class="form-horizontal" role="form" action="." method="POST" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
|
@ -6,7 +7,7 @@
|
||||||
{% render_field field style=style %}
|
{% render_field field style=style %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<!-- form.non_field_errors -->
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-offset-2 col-sm-10">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<button type="submit" class="btn btn-default">Submit</button>
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<div class="form-group" style="border-bottom: 1px solid #e5e5e5">
|
<div class="form-group" style="border-bottom: 1px solid #e5e5e5">
|
||||||
<legend class="control-label col-sm-2 {% if style.hide_label %}sr-only{% endif %}" style="border-bottom: 0">{{ field.label }}</legend>
|
<legend class="control-label col-sm-2 {% if style.hide_label %}sr-only{% endif %}" style="border-bottom: 0">
|
||||||
|
{{ field.label }}
|
||||||
|
</legend>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!--
|
|
||||||
<ul>
|
|
||||||
{% for child in field.value %}
|
|
||||||
<li>TODO</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
-->
|
|
||||||
<p>Lists are not currently supported in HTML input.</p>
|
<p>Lists are not currently supported in HTML input.</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
{% if style.inline %}
|
{% if style.inline %}
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
|
@ -13,6 +16,7 @@
|
||||||
{{ none_choice }}
|
{{ none_choice }}
|
||||||
</label>
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %} />
|
<input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %} />
|
||||||
|
@ -37,9 +41,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select class="form-control" name="{{ field.name }}">
|
<select class="form-control" name="{{ field.name }}">
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
|
@ -11,9 +14,13 @@
|
||||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
|
@ -13,9 +16,13 @@
|
||||||
<option>{{ no_items }}</option>
|
<option>{{ no_items }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label>
|
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea name="{{ field.name }}" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if style.rows %}rows="{{ style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
<textarea name="{{ field.name }}" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if style.rows %}rows="{{ style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">{{ field.label }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<form class="form-inline" role="form" action="." method="POST" novalidate>
|
<form class="form-inline" role="form" action="." method="POST" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
{% if not field.read_only %}
|
{% if not field.read_only %}
|
||||||
{% render_field field style=style %}
|
{% render_field field style=style %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<!-- form.non_field_errors -->
|
|
||||||
<button type="submit" class="btn btn-default">Submit</button>
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
|
@ -13,6 +16,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<select class="form-control" name="{{ field.name }}">
|
<select class="form-control" name="{{ field.name }}">
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
<option value="" {% if not field.value %}selected{% endif %}>--------</option>
|
<option value="" {% if not field.value %}selected{% endif %}>--------</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label class="sr-only">{{ field.label }}</label>
|
<label class="sr-only">
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input name="{{ field.name }}" type="text" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
<input name="{{ field.name }}" type="text" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<body class="container">
|
<body class="container">
|
||||||
|
|
||||||
<div class="container-fluid" style="margin-top: 30px">
|
<div class="container-fluid" style="margin-top: 30px">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
|
<div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
|
||||||
|
@ -19,8 +18,9 @@
|
||||||
<div>
|
<div>
|
||||||
<form action="{% url 'rest_framework:login' %}" role="form" method="post">
|
<form action="{% url 'rest_framework:login' %}" role="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div id="div_id_username"
|
<input type="hidden" name="next" value="{{ next }}" />
|
||||||
class="clearfix control-group {% if form.username.errors %}error{% endif %}">
|
|
||||||
|
<div id="div_id_username" class="clearfix control-group {% if form.username.errors %}error{% endif %}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="id_username">Username:</label>
|
<label for="id_username">Username:</label>
|
||||||
<input type="text" name="username" maxlength="100"
|
<input type="text" name="username" maxlength="100"
|
||||||
|
@ -35,13 +35,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="div_id_password"
|
|
||||||
class="clearfix control-group {% if form.password.errors %}error{% endif %}">
|
<div id="div_id_password" class="clearfix control-group {% if form.password.errors %}error{% endif %}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="id_password">Password:</label>
|
<label for="id_password">Password:</label>
|
||||||
<input type="password" name="password" maxlength="100"
|
<input type="password" name="password" maxlength="100" autocapitalize="off" autocorrect="off" class="form-control textinput textInput" id="id_password" required>
|
||||||
autocapitalize="off" autocorrect="off" class="form-control textinput textInput"
|
|
||||||
id="id_password" required>
|
|
||||||
{% if form.password.errors %}
|
{% if form.password.errors %}
|
||||||
<p class="text-error">
|
<p class="text-error">
|
||||||
{{ form.password.errors|striptags }}
|
{{ form.password.errors|striptags }}
|
||||||
|
@ -49,12 +47,13 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="next" value="{{ next }}" />
|
|
||||||
{% if form.non_field_errors %}
|
{% if form.non_field_errors %}
|
||||||
{% for error in form.non_field_errors %}
|
{% for error in form.non_field_errors %}
|
||||||
<div class="well well-small text-error" style="border: none">{{ error }}</div>
|
<div class="well well-small text-error" style="border: none">{{ error }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="form-actions-no-box">
|
<div class="form-actions-no-box">
|
||||||
<input type="submit" name="submit" value="Log in" class="btn btn-primary form-control" id="submit-id-submit">
|
<input type="submit" name="submit" value="Log in" class="btn btn-primary form-control" id="submit-id-submit">
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,5 +63,5 @@
|
||||||
</div><!--/.well-->
|
</div><!--/.well-->
|
||||||
</div><!-- /.row-fluid -->
|
</div><!-- /.row-fluid -->
|
||||||
</div><!-- /.container-fluid -->
|
</div><!-- /.container-fluid -->
|
||||||
</body>
|
</body>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
<ul class="pagination" style="margin: 5px 0 10px 0">
|
<ul class="pagination" style="margin: 5px 0 10px 0">
|
||||||
{% if previous_url %}
|
{% if previous_url %}
|
||||||
<li><a href="{{ previous_url }}" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
|
<li>
|
||||||
|
<a href="{{ previous_url }}" aria-label="Previous">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
|
<li class="disabled">
|
||||||
|
<a href="#" aria-label="Previous">
|
||||||
|
<span aria-hidden="true">«</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for page_link in page_links %}
|
{% for page_link in page_links %}
|
||||||
|
@ -12,16 +20,28 @@
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if page_link.is_active %}
|
{% if page_link.is_active %}
|
||||||
<li class="active"><a href="{{ page_link.url }}">{{ page_link.number }}</a></li>
|
<li class="active">
|
||||||
|
<a href="{{ page_link.url }}">{{ page_link.number }}</a>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ page_link.url }}">{{ page_link.number }}</a></li>
|
<li>
|
||||||
|
<a href="{{ page_link.url }}">{{ page_link.number }}</a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if next_url %}
|
{% if next_url %}
|
||||||
<li><a href="{{ next_url }}" aria-label="Next"><span aria-hidden="true">»</span></a></li>
|
<li>
|
||||||
|
<a href="{{ next_url }}" aria-label="Next">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="disabled"><a href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
|
<li class="disabled">
|
||||||
|
<a href="#" aria-label="Next">
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
{% if previous_url %}
|
{% if previous_url %}
|
||||||
<li class="previous"><a href="{{ previous_url }}">« Previous</a></li>
|
<li class="previous">
|
||||||
{% else %}
|
<a href="{{ previous_url }}">« Previous</a>
|
||||||
<li class="previous disabled"><a href="#">« Previous</a></li>
|
</li>
|
||||||
{% endif %}
|
{% else %}
|
||||||
{% if next_url %}
|
<li class="previous disabled">
|
||||||
<li class="next"><a href="{{ next_url }}">Next »</a></li>
|
<a href="#">« Previous</a>
|
||||||
{% else %}
|
</li>
|
||||||
<li class="next disabled"><a href="#">Next »</a></li>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
{% if next_url %}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ next_url }}">Next »</a>
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="next disabled">
|
||||||
|
<a href="#">Next »</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -5,9 +5,13 @@
|
||||||
{% if field.label %}{{ field.label }}{% endif %}
|
{% if field.label %}{{ field.label }}{% endif %}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if style.inline %}
|
{% if style.inline %}
|
||||||
<div>
|
<div>
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
|
@ -21,9 +22,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% if field.label %}<legend {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</legend>{% endif %}
|
{% if field.label %}
|
||||||
|
<legend {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</legend>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for nested_field in field %}
|
{% for nested_field in field %}
|
||||||
{% if not nested_field.read_only %}
|
{% if not nested_field.read_only %}
|
||||||
{% render_field nested_field style=style %}
|
{% render_field nested_field style=style %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% load rest_framework %}
|
{% load rest_framework %}
|
||||||
|
|
||||||
<form role="form" action="." method="POST" novalidate>
|
<form role="form" action="." method="POST" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
|
@ -6,6 +7,6 @@
|
||||||
{% render_field field style=style %}
|
{% render_field field style=style %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<!-- form.non_field_errors -->
|
|
||||||
<button type="submit" class="btn btn-default">Submit</button>
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,10 +2,15 @@
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
<input name="{{ field.name }}" {% if style.input_type != "file" %}class="form-control"{% endif %} type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% if field.label %}<legend {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</legend>{% endif %}
|
{% if field.label %}
|
||||||
|
<legend {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</legend>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<p>Lists are not currently supported in HTML input.</p>
|
<p>Lists are not currently supported in HTML input.</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if style.inline %}
|
{% if style.inline %}
|
||||||
<div>
|
<div>
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
|
@ -13,6 +16,7 @@
|
||||||
{{ none_choice }}
|
{{ none_choice }}
|
||||||
</label>
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
|
<input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
|
||||||
|
@ -29,6 +33,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
|
@ -38,9 +43,13 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,18 +1,26 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<select class="form-control" name="{{ field.name }}">
|
<select class="form-control" name="{{ field.name }}">
|
||||||
{% if field.allow_null or field.allow_blank %}
|
{% if field.allow_null or field.allow_blank %}
|
||||||
<option value="" {% if not field.value %}selected{% endif %}>--------</option>
|
<option value="" {% if not field.value %}selected{% endif %}>--------</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
<option value="{{ key }}" {% if key == field.value %}selected{% endif %}>{{ text }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}
|
||||||
|
<span class="help-block">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
<select multiple {{ field.choices|yesno:",disabled" }} class="form-control" name="{{ field.name }}">
|
||||||
{% for key, text in field.choices.items %}
|
{% for key, text in field.choices.items %}
|
||||||
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
<option value="{{ key }}" {% if key in field.value %}selected{% endif %}>{{ text }}</option>
|
||||||
|
@ -12,9 +15,11 @@
|
||||||
<option>{{ no_items }}</option>
|
<option>{{ no_items }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
{% if field.label %}
|
{% if field.label %}
|
||||||
<label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label>
|
<label {% if style.hide_label %}class="sr-only"{% endif %}>
|
||||||
|
{{ field.label }}
|
||||||
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<textarea name="{{ field.name }}" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if style.rows %}rows="{{ style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
<textarea name="{{ field.name }}" class="form-control" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if style.rows %}rows="{{ style.rows }}"{% endif %}>{% if field.value %}{{ field.value }}{% endif %}</textarea>
|
||||||
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if field.help_text %}
|
{% if field.help_text %}
|
||||||
<span class="help-block">{{ field.help_text }}</span>
|
<span class="help-block">{{ field.help_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user