Skip to content

volodymyrko/django-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

==============
django-preview
==============


``django-preview`` is a clone of django-beta (https://github.com/revsys/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


=============
Configuration
=============

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 = 'username@gmail.com'
	EMAIL_USE_TLS = True
	EMAIL_HOST = 'smtp.gmail.com'
	EMAIL_HOST_USER = 'username@gmail.com'
	EMAIL_HOST_PASSWORD = 'your_gmail_password'
	EMAIL_PORT = 587


Installation
============

Add ``preview`` to your ``INSTALLED_APPS`` and run syncdb.

Add the following to your urls.py:

    url(r'^preview/', include('preview.urls')),

Using the example templates provided in the code, create your customized preview signup templates.

Managers
--------

The ``BetaSignup`` model has the following manager method to help out:

BetaSignup.objects.contacted()
BetaSignup.objects.not_contacted()
BetaSignup.objects.registered()
BetaSignup.objects.not_registered()

Side Effects
------------

``django-preview`` listens for a signal on User creation and marks the
corresponding BetaSignup entry as 'registered'.

Releases

No releases published

Packages

No packages published

Languages