aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/response.py
diff options
context:
space:
mode:
authorTom Christie2012-09-04 09:29:59 +0100
committerTom Christie2012-09-04 09:29:59 +0100
commit6af75d3a69c486b19adc6e2da00719094778eb31 (patch)
tree825a2696ff5999b02b5ff338d44f3ee2cdc7ccc2 /djangorestframework/response.py
parent6e21915934686cc7d46c8144403c933fa6fd2375 (diff)
downloaddjango-rest-framework-6af75d3a69c486b19adc6e2da00719094778eb31.tar.bz2
Remove some bits from utils
Diffstat (limited to 'djangorestframework/response.py')
-rw-r--r--djangorestframework/response.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/djangorestframework/response.py b/djangorestframework/response.py
index 4664e079..65173200 100644
--- a/djangorestframework/response.py
+++ b/djangorestframework/response.py
@@ -11,15 +11,18 @@ by specifying an ``_accept=`` parameter in the URL. Also, `Response` will ignore
from Internet Explorer user agents and use a sensible browser `Accept` header instead.
"""
+
+import re
from django.template.response import SimpleTemplateResponse
from django.core.handlers.wsgi import STATUS_CODE_TEXT
-
from djangorestframework.settings import api_settings
from djangorestframework.utils.mediatypes import order_by_precedence
-from djangorestframework.utils import MSIE_USER_AGENT_REGEX
from djangorestframework import status
+MSIE_USER_AGENT_REGEX = re.compile(r'^Mozilla/[0-9]+\.[0-9]+ \([^)]*; MSIE [0-9]+\.[0-9]+[a-z]?;[^)]*\)(?!.* Opera )')
+
+
class NotAcceptable(Exception):
pass