#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: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Sagar Chalise):
* needs_better_patch: 1 => 0
* stage: Accepted => Unreviewed
* needs_tests: 1 => 0
* needs_docs: 1 => 0
Comment:
Well, I hadn't thought of scenarios regarding swappable anonymous user,
the simple use case I am seeing is similar to `AbstractBaseUser` that is
recommended as base class of custom user in django documentation. The
methods and attributes that are available in `AbstractBaseUser` are
availabe in `AnonymousBaseUser`. This way I see users creating
`AnonymousUser` class based on `AnonymousBaseUser` if they need to
implement AnonymousUser on their own especially in authentication
middleware and when not using `contrib.auth`.
Maybe something like:
{{{
class AnonymousUser(AnonymousBaseUser):
pass
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29381#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.f1e5d49b31284f3a68d6034c4b28bbff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.