1

I am at a beginning of a "company web app project". I tried a Django cookiecutter template, and so far I like what I see. What I see I won't need is the user registration, password reset, social-app logins, and so on, because I will use LDAP for my user login. Afaik the stuff I don't need is provided by that "allauth" apps (please correct me).

What would be the steps needed to remove this functionality so I can have the authentication more like when starting a project via Django "starproject"?

I don't have any crucial data in the DB, or any models I care about, so instructions for a fresh start would be ideal.

MY idea was to remove the allauth apps from "APPS" in settings and only then do the initial migrations, but something tells me it won't be that easy. I am an intermediate python dev, but new to Django.

Thank you all in advance for your ideas.

1 Answers1

1

Allauth doesn't force any particular user model on you, so it probably will be that easy – remove the installed_app, remove any urls references, remove the package(s) from requirements.

AKX
  • 152,115
  • 15
  • 115
  • 172
  • If I already created migrations and migrated (I have some "allauth" tables in my db), I gues the best step would be to start the project again, delete what you suggested and only then create the initial migration, right? – Jakub Červinka May 20 '21 at 10:47
  • That's one option, but you can pretty probably just eradicate the allauth references from your migrations (likely only migration dependencies) and run migrations again. (You can also do a project-wide search for allauth afterwards to be sure.) – AKX May 20 '21 at 10:52
  • 1
    Thanks. I'll try and report back, possibly also mark as solved. I have the benefit of a fresh start so basically nothing to lose. Sounds doable. – Jakub Červinka May 20 '21 at 11:02
  • Basically what you said. On top of that I removed some links in navbar in base.html template, that were referencing the allauth views. But that would be reworked in the end anyways. I also "reseted" the db the hard way by dropping it totally [here](https://stackoverflow.com/questions/34576004/simple-way-to-reset-django-postgresql-database). – Jakub Červinka May 20 '21 at 12:12