Skip to content

Instantly share code, notes, and snippets.

@jaddison
Last active December 10, 2015 20:08
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 jaddison/4486038 to your computer and use it in GitHub Desktop.
Save jaddison/4486038 to your computer and use it in GitHub Desktop.
django-simple-templates example of using a custom assignment tag to get a signup form working in any simple template.
{% extends "base.html" %}
{% load user_tags %}
{% block head-gace-js %}
// paste your Google Analytics Content Experiment JS code here if you're running an experiment.
{% endblock %}
{% block content %}
<h2>Awesome webpage content for businesses.</h2>
{% get_signup_form as signup_form %}
<form action='/some/great/relative/url/' method='POST'>
{{ signup_form.email }}
<input type='submit' value='Sign up!' />
</form>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment