{% extends "base.html" %} {% block content %}
This anchor tag POSTs to {% url 'click' %}
when it is clicked.
This anchor tag GETs from {% url 'redirector' %}
when it is clicked.
intercooler_helpers.middleware.IntercoolerRedirector
to turn standard Django redirects (301
and 302
) into Intercooler compatible client-side ones.This demo shows how to do AJAX validation & submission of a form, without doing a full page redirect.
ic-post-to
to replace the normal action="..."
ic-select-from-response
is used to pluck out the #example-form
to replace the form on error.intercooler_helpers.middleware.IntercoolerRedirector
to redirect on successThis demo shows how to set up a list that is appended to periodically and that can be paused and resumed
{% url 'polling' %}
url every two seconds by using the
ic-prepend-from
and
ic-poll
attributes, and prepends the results
into an inner div using the
ic-target
attribute.
ic-post-to
attribute and update their respective parent div. The server either starts or stops polling by using
the X-IC-ResumePolling
or X-IC-CancelPolling
response headers, respectively.
This example demos an infinite scroll UI.
ic-append-from
attribute that loads the next page of results, and that uses
ic-trigger-on
to trigger the request when the row is scrolled into view. The row targets the body of the table to
append to using the
ic-target
attribute and shows an indicator for the request via the
ic-indicator
attribute.