Hello everyone.

There's a way to set your own AdminSite class as said in docs:

https://docs.djangoproject.com/en/3.0/ref/contrib/admin/#overriding-the-default-admin-site


But I also want to change login view behavior.

I want to replace *LoginView* in

*django.contrib.admin.sites.AdminSite.login*

method (by analogy with for example *login_form *parameter in the same *AdminSite* class).


I need it to write custom logic in *form_valid* method, and it looks dirty and unnecessary to copy-paste whole login view code.

Can project code be improved this way?


Best Regards.



--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0a5f010a-df61-a7ce-e62f-281108c8dfd8%40gmail.com.

Reply via email to