Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Gabriel Araya Garcia
Davansh: The tables are made already in Admin Django, you only have to build template (html), and the view. For example, in views.py: def login_ini(request): variable1 = 'Pantalla de Acceso al Sistema' error_log = 'ok' username = request.POST.get('username') password =

Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Chelsea Fan
try this code, do not forget import authenticate (from django.contrib.auth import authenticate, login) modify this code On Wed, Mar 3, 2021 at 8:01 PM Kasper Laudrup wrote: > On 03/03/2021 16.27, Devansh Soni wrote: > > Hi, > > > > I'm currently working on a Django project in which I have to

Re: Create a custom User model and Authenticate with it

2021-03-03 Thread Kasper Laudrup
On 03/03/2021 16.27, Devansh Soni wrote: Hi, I'm currently working on a Django project in which I have to create a User model with fields such as username, email, college, branch, semester, password, etc. And use this model to authenticate a user with an email and password. How can I

Create a custom User model and Authenticate with it

2021-03-03 Thread Devansh Soni
Hi, I'm currently working on a Django project in which I have to create a User model with fields such as username, email, college, branch, semester, password, etc. And use this model to authenticate a user with an email and password. How can I achieve this? Or what are the ways to achieve