<imgsrc="_images/inheritance-226e89d7da8304ffcc884462a1620b9e4209ee59.png"alt="Inheritance diagram of django_select2.views"usemap="#inheritanceb5a6c91e22"class="inheritance"/>
<ttclass="descclassname">django_select2.views.</tt><ttclass="descname">NO_ERR_RESP</tt><emclass="property"> = 'nil'</em><aclass="headerlink"href="#django_select2.views.NO_ERR_RESP"title="Permalink to this definition">¶</a></dt>
<dd><p>Equals to ‘nil’ constant.</p>
<p>Use this in <aclass="reference internal"href="#django_select2.views.Select2View.get_results"title="django_select2.views.Select2View.get_results"><ttclass="xref py py-meth docutils literal"><spanclass="pre">Select2View.get_results()</span></tt></a> to mean no error, instead of hardcoding ‘nil’ value.</p>
<emclass="property">class </em><ttclass="descclassname">django_select2.views.</tt><ttclass="descname">JSONResponseMixin</tt><aclass="reference internal"href="_modules/django_select2/views.html#JSONResponseMixin"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.JSONResponseMixin"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">response_class</tt><aclass="headerlink"href="#django_select2.views.JSONResponseMixin.response_class"title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <ttclass="xref py py-class docutils literal"><spanclass="pre">HttpResponse</span></tt></p>
<ttclass="descname">render_to_response</tt><big>(</big><em>context</em>, <em>**response_kwargs</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#JSONResponseMixin.render_to_response"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.JSONResponseMixin.render_to_response"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">convert_context_to_json</tt><big>(</big><em>context</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#JSONResponseMixin.convert_context_to_json"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.JSONResponseMixin.convert_context_to_json"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">django_select2.views.</tt><ttclass="descname">Select2View</tt><big>(</big><em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#Select2View"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.Select2View"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">respond_with_exception</tt><big>(</big><em>e</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#Select2View.respond_with_exception"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.Select2View.respond_with_exception"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">Response with status code of 404 if e is <ttclass="docutils literal"><spanclass="pre">Http404</span></tt> object,
<ttclass="descname">check_all_permissions</tt><big>(</big><em>request</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#Select2View.check_all_permissions"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.Select2View.check_all_permissions"title="Permalink to this definition">¶</a></dt>
<dd><p>Sub-classes can use this to raise exception on permission check failures,
or these checks can be placed in <ttclass="docutils literal"><spanclass="pre">urls.py</span></tt>, e.g. <ttclass="docutils literal"><spanclass="pre">login_required(SelectClass.as_view())</span></tt>.</p>
<ttclass="descname">get_results</tt><big>(</big><em>request</em>, <em>term</em>, <em>page</em>, <em>context</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#Select2View.get_results"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.Select2View.get_results"title="Permalink to this definition">¶</a></dt>
<li><strong>page</strong> (<aclass="reference external"href="http://docs.python.org/2.7/library/functions.html#int"title="(in Python v2.7)"><ttclass="xref py py-obj docutils literal"><spanclass="pre">int</span></tt></a>) – The page number. If in your last response you had signalled that there are more results,
<li><strong>context</strong> (<aclass="reference external"href="http://docs.python.org/2.7/library/functions.html#str"title="(in Python v2.7)"><ttclass="xref py py-obj docutils literal"><spanclass="pre">str</span></tt></a> or None) –<p>Can be anything which persists across the lifecycle of queries for the same search term.
<emclass="property">class </em><ttclass="descclassname">django_select2.views.</tt><ttclass="descname">AutoResponseView</tt><big>(</big><em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/django_select2/views.html#AutoResponseView"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#django_select2.views.AutoResponseView"title="Permalink to this definition">¶</a></dt>
<p>A central view meant to respond to Ajax queries for all Heavy widgets/fields.
Although it is not mandatory to use, but is immensely helpful.</p>
<divclass="admonition tip">
<pclass="first admonition-title">Tip</p>
<pclass="last">Fields which want to use this view must sub-class <ttclass="xref py py-class docutils literal"><spanclass="pre">AutoViewFieldMixin</span></tt>.</p>