Setup¶
You have to add the app to INSTALLED_APPS
and also include some URLs in
your urlconf
:
INSTALLED_APPS = (
...
'signup',
...
)
urlpatterns = patterns('',
...
url(r'^accounts/', include('signup.urls')),
...
)
Settings¶
These are the settings specific to django-signup
.
SIGNUP_ACTIVATION_DAYS
¶
This controls for how many days an instance of
signup.models.Validation
will be valid before being considered
“expired”. It is used on the clear_expired_signups management command.
If not set in the user settings, the default value is 2 days.
SIGNUP_FORM_CLASS
¶
A string with the full dotted name of a class representing the form to be used on the signup page.
If not specified, the signup.forms.DefaultUserCreationForm
class is
used.
SIGNUP_ALLOWED
¶
A boolean indicating whether signup is allowed. If True
, nothing special
happens. If False
, all requests to the account creation page will be
redirected to a template saying that registration is closed.
New in version 0.5.
This can also be a dotted path to a callable that takes no arguments and returns a boolean indicating whether signup is allowed or not.
Signals¶
New in version 0.6.
There are two signals defined in the signup.signals
module:
user_signed_up
and user_activated
. The first is sent right after the
user object has been created. The second is sent after the user has hit his
activation URL and the corresponding Validation
object has been
deleted.
Both signals are sent with two arguments: user
, the user object, and
request
, the view request object.