[Answer]-Django โ€“ Separation of concerns and authentication

1๐Ÿ‘

โœ…

I dont understand whats wrong with your code. why do you say its wrong ?

Other then that,why dont you prefer to use the Auth login form ? Look at AuthenticationForm in the Auth module, Its done exactly what you are trying to do.

Also , you should consider to pass a Request Context in your view , this way you will not have to pass the csrf manually.

๐Ÿ‘คNuno_147

Leave a comment