[Newbie] I tried to disable django-registration by:
1.registration_allowed() I saw this method on the source registration_allowed() /registration/views but I don't know if it's what I need or how to use it.
Maybe I need a variable on settings.py
2.Commenting the lines Commenting the /registration/backends/urls.py register urls (only the lines regarding registration)
But this breaks the urls, so any idea?
Thanks!
Registration actually includes a setting for this called REGISTRATION_OPEN. Simply set it to false in your settings.py file and include a registration/registration_closed.html template.
Short solution: you can place a reference to your own view in urls.py ABOVE including registration's urls. So your view will intercept the request, and you can do anything you want (i.e. return redirect somewhere else).
Correct solution: write your own registration backend and templates and remove references to the register view from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With