.. _setup: Setup ===== You have to add the app to ``INSTALLED_APPS`` and also include some URLs in your ``urlconf``: .. code-block:: python INSTALLED_APPS = ( ... 'signup', ... ) .. code-block:: python urlpatterns = patterns('', ... url(r'^accounts/', include('signup.urls')), ... ) Settings -------- These are the settings specific to ``django-signup``. .. _setting-activation-days: ``SIGNUP_ACTIVATION_DAYS`` ************************** This controls for how many days an instance of :py:class:`signup.models.Validation` will be valid before being considered "expired". It is used on the :ref:`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 :py:class:`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. .. versionadded:: 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 ------- .. versionadded:: 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 :class:`Validation` object has been deleted. Both signals are sent with two arguments: ``user``, the user object, and ``request``, the view request object.