How do I configure django-allauth with production code?

Hello!

I would like to configure django-allauth with my project, which is in production. The reason is that I want the users to verify their email before having access to any part of my project which require authentication.

I have read the documentation, but have a few questions before I attempt to use django-allauth.

  1. How do I use my own custom forms?
  2. Can I use modelforms with django-allauth forms?
  3. I’m using a custom user model. How would django-allauth know that I’m using a custom user model?
  4. Can I subclass the django-allauth views in my CBV?
  5. I already have URL to each of my CBV. What should I do with the URLs that come with django-allauth?

Hey. Using a new lib is often times confusing.

Did you have a look at this page?

It seems you can simply inherit from the base form provided by the lib and go from there. That page has examples.

Did you put the config in your settings.py pointing to the custom user model? Look here.

For subclassing the views (look here for a list of views), I suppose you should be able to do it without issues and then just override the route(s) in your urls.py file.

I believe you should be using the urls from django-allauth and override as needed.

Good luck :crossed_fingers:

1 Like