Re-configuring allauth to fit custom specifications

13 views
Skip to first unread message

Fun. Bytes

unread,
Jan 2, 2018, 4:15:42 PM1/2/18
to Django users

I have a set of expectations I'm trying to achieve. I want a sign up, login, and forget password page. I also want to have social sign in using Twitter, Facebook, or Google. Another thing I want is to send a confirmation email to the user validating their account.

I know I can do this with Django allauth, but allauth comes with extra features that I don't need. For example, I don't need the password reset and change email pages. I want to remove these pages and their corresponding functionality, but I'm afraid I might break the code if I do this.

I was thinking about two solutions. One solution would be to go through the allauth templates and change some of the code to fit my specifications, but I feel like it would be very tedious because a lot of things might break if I remove some funcionality.

The second solution I was thinking of doing was building on top of auth and using a custom User model and building custom login, sign up, and reset pages. Adding the required functionality and everything. I could also build the models to provide social login by copying allauth's templates. I am just debating on what would be the best possible choice to do this. I would be happy if anyone can point me in the right direction.

Andréas Kühne

unread,
Jan 3, 2018, 4:45:51 AM1/3/18
to django...@googlegroups.com
Hi,

I haven't used allauth specifically, but you can always do things like this:

1. Override the default templates by including your templates first. That way you will only get the functionality that your templates add. See here : https://docs.djangoproject.com/en/2.0/howto/overriding-templates/ 

2. You can only add the views that you need from the all auth package. If you check through the all auth package you will find a urls.py somewhere. Only add the views that you require for your project and you should be fine.

Regards,

Andréas

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5f49ce0c-9f85-4e23-a44d-2ebbe08f1695%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages