#29381: Move some parts of `django.contrib.auth.models` to
`django.contrib.auth.base_user` for reusability
-------------------------------+------------------------------------
     Reporter:  Sagar Chalise  |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.auth   |                  Version:  dev
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  1
  Needs tests:  1              |  Patch needs improvement:  1
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

 * cc: Ülgen Sarıkavak (added)


Old description:

> ----
> This is more of an idea than bug but most of the time when need to use
> authentication without using `contrib.auth` one needs to rewrite some of
> the parts that can be reused if it were in base_user when the interface
> is similar to django.contrib.auth.
> I am mostly talking about update_last_login function and AnonymousUser
> when custom user is derived from AbstractBaseUser.
>
> May be create AnonymousBaseUser with parts that are compatible to
> AbstractBaseUser in `base_user.py` and use that as base class for
> AnonymousUser. Also, update_last_login function can be moved to
> `base_user.py` so that it can be reused.

New description:

 ----
 This is more of an idea than bug but most of the time when need to use
 authentication without using `contrib.auth` one needs to rewrite some of
 the parts that can be reused if it were in base_user when the interface is
 similar to django.contrib.auth.
 I am mostly talking about update_last_login function and AnonymousUser
 when custom user is derived from AbstractBaseUser.

 May be create AnonymousBaseUser with parts that are compatible to
 AbstractBaseUser in `base_user.py` and use that as base class for
 AnonymousUser. Also, update_last_login function can be moved to
 `base_user.py` so that it can be reused.

--
-- 
Ticket URL: <https://code.djangoproject.com/ticket/29381#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e50511a2b-36cffc80-dcf5-414d-9b0d-31cf5750894d-000000%40eu-central-1.amazonses.com.

Reply via email to