Opened 6 years ago

Closed 6 years ago

#11699 closed (invalid)

override _display_login_form

Reported by: davo Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi I am trying to override the _display_login_form from

http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/views/decorators.py

So basicly I have the following code

from django.http import HttpResponseRedirect
from django.contrib.admin.views import decorators

def _redirect_login(request, *args, **kwargs):
    return HttpResponseRedirect('http://www.google.com')

decorators._display_login_form = _redirect_login

I tried to add this inside models/middleware(precess_request)/urls every time when I visit the admin login page I am not redirected at all.
am I missing something?

Change History (1)

comment:1 Changed 6 years ago by dc

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Please ask usage questions on django-users or #django channel.

Note: See TracTickets for help on using tickets.
Back to Top