Задать вопрос

Тел: +7 965 3737 888

634

Просмотров

0

Ответов

Basic HTTP Authentication

A patch (against django svn trunk 4649) that allows users to log in with Basic HTTP Authentication i.s.o. login forms using some simple middleware (entire patch is ~50 lines). I was unaware of http://code.djangoproject.com/wiki/GenericAuthorization so I'm not sure about its usefulness in the long run.

You can enable it by including 'django.contrib.auth.middleware.BasicAuthenticationMiddleware' in your MIDDLEWARE_CLASSES and then adding the following lines in your settings.py:

BASIC_WWW_AUTHENTICATION = True

WWW_AUTHENTICATION_REALM = "djangolures.com"

Updated: See also http://code.djangoproject.com/ticket/3609 (patch now availble here as well).

Вопрос полезен? Да0/Нет0
file_4481.py(4.8Кб)
None