[Django]-TypeError: login() takes 1 positional argument but 2 were given

169👍

Your view has the same name as the auth login function, so it is hiding it. Change the view name, or import the function under a different name eg from django.contrib.auth import login as auth_login.

8👍

You have a function def login and a library import with the same name.

What you need is to change one of them.

Example :

- def user_login  // import login as Login_process 

4👍

You can not use same name for your def whom you imported.
so change your def name from def login to another one.

0👍

You have to change your def name using another name because name of your your module and function

Leave a comment