Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add registration_closed.html #17

Open
olberger opened this issue Nov 5, 2013 · 1 comment
Open

Please add registration_closed.html #17

olberger opened this issue Nov 5, 2013 · 1 comment

Comments

@olberger
Copy link

olberger commented Nov 5, 2013

Django-registration allows setting REGISTRATION_OPEN to False, in which case a registration_closed.html template would be displayed.

It would be great to include it also, for completeness.

Thanks in advance.

@cljohnson
Copy link

For others who may view this issue, I found the ACCOUNT_ACTIVATION_DAYS in /path/to/your/project/application/registration_defaults.py.

Also there is the appropriate statement for including the template path i.e. REGISTRATION_TEMPLATE_DIR = os.path.join(os.path.dirname(file), "templates")

You will see that author yourcelf set the ACCOUNT_ACTIVATION_DAYS to 2, as opposed to the django-registration default value of 7.

It's easy enough to add REGISTRATION_OPEN = (either True or False) to the same file.

These are the only configurable default values. See: https://django-registration.readthedocs.org/en/latest/default-backend.html

This backend makes use of the following settings:

ACCOUNT_ACTIVATION_DAYS
This is the number of days users will have to activate their accounts after registering. Failing to activate during that period will leave the account inactive (and possibly subject to deletion). This setting is required, and must be an integer.
REGISTRATION_OPEN
A boolean (either True or False) indicating whether registration of new accounts is currently permitted. This setting is optional, and a default of True will be assumed if it is not supplied.

I hope this helps you or others. I initially stuck the same stuff found in settings.py in other project settings files. Once I saw what author yourcelf did, I reverted my code and simply relied on this file.

Cheers.

Thanks to yourcelf for sharing his work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants