README.md

Pinax Waiting List

Table of Contents

About Pinax

Pinax is an open-source platform built on the Django Web Framework. It is an ecosystem of reusable Django apps, themes, and starter project templates. This collection can be found at http://pinaxproject.com.

pinax-waitinglist

Overview

pinax-waitinglist is an app for Django sites for collecting user emails on
a waiting list before a site has launched. It also provides basic survey
capabilities to gather information from your potential users.

For an out-of-the-box Django project already set up with pinax-waitinglist
and Bootstrap templates, see the Pinax waitinglist starter project.

<!-- templates/waitinglist/success.html -->
<divclass="site-wrapper-inner">
<divclass="cover-container">
<divclass="inner cover">
<h1class="cover-heading">Thank you!</h1>
<pclass="lead">You are on the list. We will notify you know when this site launches.</p>
<p>
If you have any questions, feel free to email <ahref="mailto:info@example.com"><b>info@example.com</b></a>.
</p>
</div>
<divclass="mastfoot">
<divclass="inner">
<p>{%include"_footer.html"%}</p>
</div>
</div>
</div>
</div>

Survey

If you would like to offer a survey after users enter their email:

A survey will need to be created with one or more questions. Surveys and their questions are accessed through the admin interface.

Email Survey to existing emails

Existing emails can be emailed surveys through a django command, mail_out_survey_links
.

A SITE object is passed to both of the following templates, if you haven't enabled the sites framework yet, you will need to do so before proceeding. Additional information on enabling can be found at The “sites” framework.

Campaigns and Referrals

Campaigns work by just taking the querystring parameter wlc if present in querystring and records
the value to the waitinglist entry. This is useful if you want to track conversions of a particular
ad campaign. You can set, for instance, https://mysite.com/?wlc=c1, as the url for the ad. when
people click on the ad, and signup, c1 will be added to their entry and is viewable in the admin.

Referrals work the same as campaigns but work automatically. If there a value in request.META["HTTP_REFERER"]
when landing on the signup page, the value will get required in the referral field of the waitinglist entry.

Settings

WAITINGLIST_SURVEY_SECRET

Defaults to SECRET_KEY

This is used for generating the hash for pinax.waitinglist.models.SurveyInstance.code.

DEFAULT_HTTP_PROTOCOL

Defaults to HTTP

Provided as context in certain emails for URL building.

Reference

Management Commands

waitinglist.management.commands.mail_out_survey_links

Email links to survey instances for those that never saw a survey. Retrieves the currently active Survey, and filters WaitingListEntry where SurveyInstance is null.

Customizing Templates

Override the default pinax-templates templates by copying them into your project
subdirectory pinax/waitinglist/ on the template path and modifying as needed.

For example if your project doesn't use Bootstrap, copy the desired templates
then remove Bootstrap and Font Awesome class names from your copies.
Remove class references like class="btn btn-success" and class="icon icon-pencil" as well as
bootstrap from the {% load i18n bootstrap %} statement.
Since bootstrap template tags and filters are no longer loaded, you'll also need to update
{{ form|bootstrap }} to {{ form }} since the "bootstrap" filter is no longer available.

_list_signup.html

Rendered by ajax_list_signup view when form is not valid and gets passed form (WaitingListEntryForm) in context.

_success.html

Rendered by ajax_list_signup view when form is valid.

User-Provided Templates

Create these templates in a pinax/waitinglist/ subfolder in your template search path.

list_signup.html

Rendered by list_signup view and gets passed form (WaitingListEntryForm) in context.

success.html

Rendered by django.views.generic.TemplateView.

survey.html

Rendered by survey view when request method is GET and gets passed form (SurveyForm) in context.

In case of any questions we recommend you join our Pinax Slack team
and ping us there instead of creating an issue on GitHub. Creating issues on GitHub is of course
also valid but we are usually able to help you faster if you ping us in Slack.

Code of Conduct

In order to foster a kind, inclusive, and harassment-free community, the Pinax Project
has a code of conduct.
We ask you to treat everyone as a smart human programmer that shares an interest in Python, Django, and Pinax with you.