User registration with Django allauth

1.8k views Asked by At

I am working on a project in a team using Django. I am trying to implement User Registration part in Django. This is what I have done so far. I have created a separate application within my project called signup. In this application, I am providing a page to the anonymous user to sign up for my web application. The user is able to sign in successfully and I can see him as admin inside Django Admin interface.

I am also using django-allauth. Now, I want that whenever the user signs up, the admin should accept/reject the users registration. How can I achieve that in allauth?

1

There are 1 answers

0
e.barojas On

This is what I have done so far. I have created a separate application within my project called signup.

You don't need to do this, as Django Allauth already does it. As soon as you get it running, which takes some time, allauth will already have standard apps, with views + templates for users who want to signup, login, change password, recover password, etc.

You can make new users have to confirm an email before using your app by specifying this in settings.py

ACCOUNT_EMAIL_VERIFICATION = 'mandatory'

However, I do not see a reason why you would want to manually accept users with human input. If that is the case, I suggest removing all signup pages, and manually creating users from a shell window or admin panel on request.

If you want more detail on how to set it up, try example1 or further reading.