Multiple Model Authentication in Django

Asked

Viewed 21 times

0

I am developing an application with Django 3, in it I have the candidate model and the company model that have login and password as fields. The idea is that the candidate model and the company model can authenticate using the authentication classes of Django( Django Authentication system) to make the validations and authentication. Is it possible to use the classes for more than one model? Otherwise, what would be the best solution?

  • 1

    Without looking at your.py models, since you didn’t share code. I would say you can use with abstract class. However, why not use everything in the same model? You add a type, candidate and company, and it would always be the same.

  • 1

    That’s right, I found here what I need. Thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.