+if VERSION >= (1, 10):
+ from django.urls import get_callable, reverse
+ user_is_authenticated = lambda user: user.is_authenticated
+else:
+ from django.core.urlresolvers import get_callable, reverse
+ user_is_authenticated = lambda user: user.is_authenticated()
+