@@ -32,8 +32,8 @@ class DjangoIntegration:
32
32
identifier = "django"
33
33
34
34
def __init__ (self , capture_exception_fn = None ):
35
- if DJANGO_VERSION < (1 , 8 ):
36
- raise IntegrationEnablingError ("Django 1.8 or newer is required." )
35
+ if DJANGO_VERSION < (1 , 10 ):
36
+ raise IntegrationEnablingError ("Django 1.10 or newer is required." )
37
37
38
38
# TODO: Right now this seems too complicated / overkill for us, but seems like we can automatically plug in middlewares
39
39
# which is great for users (they don't need to do this) and everything should just work.
@@ -58,17 +58,6 @@ def uninstall(self):
58
58
pass
59
59
60
60
61
- if DJANGO_VERSION < (1 , 10 ):
62
-
63
- def is_authenticated (request_user ):
64
- return request_user .is_authenticated ()
65
-
66
- else :
67
-
68
- def is_authenticated (request_user ):
69
- return request_user .is_authenticated
70
-
71
-
72
61
class DjangoRequestExtractor :
73
62
def __init__ (self , request ):
74
63
# type: (Any) -> None
@@ -104,7 +93,7 @@ def user(self):
104
93
105
94
user = getattr (self .request , "user" , None )
106
95
107
- if user is None or not is_authenticated ( user ) :
96
+ if user is None or not user . is_authenticated :
108
97
return user_data
109
98
110
99
try :
0 commit comments