django-preview is a clone of django-beta module. It is a simple application to help you capture pre-beta interest with your sites.
By default django-beta only captures a user's email address, however you can alternately set one of these two configuration options:
django-preview add next additional functionality:
1. After user sign up, it receive email with information about subscription
2. User can unsubscribe following the url, recieved in email
PREVIEW_CAPTURE_FIRST = True, will use a form and require the user to enter their first name and email address.(Default: False)
PREVIEW_CAPTURE_BOTH = True, will use a form and require the user enter their first name, last name, and email address.(Default: False)
PREVIEW_SEND_MAIL = False, will disable sending mail to user during subscribtion. (Default = True)
If PREVIEW_SEND_MAIL = True (default) you must properly configure django to send mail:
Mail is sent using the SMTP host and port specified in the EMAIL_HOST and EMAIL_PORT settings. The EMAIL_HOST_USER and EMAIL_HOST_PASSWORD settings, if set, are used to authenticate to the SMTP server, and the EMAIL_USE_TLS setting controls whether a secure connection is used.
Fox example, to use gmail account set in setting.py settings like this:
DEFAULT_FROM_EMAIL = 'email@example.com'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'firstname.lastname@example.org'
EMAIL_HOST_PASSWORD = 'your_gmail_password'
EMAIL_PORT = 587
Add ``preview`` to your ``INSTALLED_APPS`` and run syncdb.
Add the following to your urls.py:
Using the example templates provided in the code, create your customized preview signup templates.
The ``BetaSignup`` model has the following manager method to help out:
django-preview listens for a signal on User creation and marks the corresponding BetaSignup entry as 'registered'.