This commit is contained in:
James Socol 2012-09-17 15:13:29 -04:00
Родитель c1dd1bf9c0
Коммит c8b94e0067
3 изменённых файлов: 1 добавлений и 12 удалений

Просмотреть файл

@ -21,14 +21,3 @@ class ScrubRequestOnException(object):
# Clearing out all cookies in request.META. They will already # Clearing out all cookies in request.META. They will already
# be sent with request.COOKIES. # be sent with request.COOKIES.
request.META['HTTP_COOKIE'] = '******' request.META['HTTP_COOKIE'] = '******'
class HidePasswordOnException(ScrubRequestOnException):
def __init__(self):
import warnings
warnings.warn(
"The middleware at `commonware.middleware.HidePasswordOnException` "
"is deprecated; use `commonware.middleware.ScrubRequestOnException` "
"instead.",
DeprecationWarning
)

Просмотреть файл

@ -4,6 +4,7 @@ from django.conf import settings
TYPES = (socket.AF_INET, socket.AF_INET6) TYPES = (socket.AF_INET, socket.AF_INET6)
def is_valid(ip): def is_valid(ip):
for af in TYPES: for af in TYPES:
try: try:

Просмотреть файл

@ -1,6 +1,5 @@
from django.http import HttpResponse from django.http import HttpResponse
from mock import patch from mock import patch
from nose.tools import eq_
from commonware.response.cookies.monkeypatch import patch_all from commonware.response.cookies.monkeypatch import patch_all