#17254: ModelBackend should have a get_anonymous_user method ------------------------------------+-------------------------------------- Reporter: riccardodivirgilio | Owner: nobody Type: Bug | Status: reopened Component: contrib.auth | Version: Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------------+--------------------------------------
Comment (by riccardodivirgilio): i've attached a .diff the only thing to do then is to change django.contrib.auth.get_user and instead of import directly AnonimousUser return the anonymous user class defined inside the backend. this change have got no compatibility problems for any running django application, but can save a lot of problems to django developers in the future. trust me, because i've got a lot of problems for this small issue. i've to write a lot of functions, a lot of getattr, a lot of hasattr, and this is not clean and not readable. -- Ticket URL: <https://code.djangoproject.com/ticket/17254#comment:10> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.