Skip to content

Instantly share code, notes, and snippets.

@bwarren2
Created February 24, 2014 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwarren2/9194940 to your computer and use it in GitHub Desktop.
Save bwarren2/9194940 to your computer and use it in GitHub Desktop.
subscribe_form
{% load url from future %}
{% load bootstrap_tags %}
<div class="subscribe-form">
<h2>Purchase a Subscription</h2>
<p class="lead">Provide your payment details to start your subscription today.</p>
{% if error %}
<div class="alert alert-error">{{ error }}</div>
{% endif %}
<form action="{% url 'payments:payments_ajax_subscribe' %}" class="form ajax" data-stripe-key="{{ STRIPE_PUBLIC_KEY }}" data-replace-closest=".subscribe-form" method="POST">
{% csrf_token %}
{{ form|as_bootstrap }}
<input name="stripe_token" type="hidden" />
<div class="form-actions">
<button type="submit" class="btn btn-primary">Subscribe</button>
</div>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment