from __future__ import unicode_literals
# handler404 and handler500 are needed for admin tests
from guardian.compat import include, patterns, handler404, handler500 # pyflakes:ignore
from guardian.mixins import PermissionRequiredMixin
from django.contrib import admin
from django import get_version as django_get_version

if (django_get_version() >= "1.5"):
    from django.views.generic import View

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
)

if (django_get_version() >= "1.5"):

    class testClassRedirectView(PermissionRequiredMixin, View):
        permission_required = 'testapp.change_project'

    urlpatterns += patterns('',
        (r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'blank.html'}),
        (r'^permission_required/', testClassRedirectView.as_view()),
    )

@@ -125,24 +125,19 @@
 nclude, 
-patterns
+url
 , handle
@@ -153,16 +153,17 @@
 dler500 
+ 
 # pyflak
@@ -272,274 +272,110 @@
 ango
- import get_version as django_get_version%0A%0Aif (django_get_version() %3E= %221.5%22):%0A    from django.views.generic import View%0A%0Aadmin.autodiscover()%0A%0Aurlpatterns = patterns('',%0A    (r'%5Eadmin/', include(admin.site.urls)),%0A)%0A%0Aif (django_get_version() %3E= %221.5%22):%0A%0A    class t
+.contrib.auth.views import login%0Afrom django.views.generic import View%0A%0Aadmin.autodiscover()%0A%0A%0Aclass T
 estC
@@ -427,20 +427,16 @@
 w):%0A    
-   
- 
 permissi
@@ -475,20 +475,16 @@
 oject'%0A%0A
-    
 urlpatte
@@ -491,32 +491,66 @@
 rns 
-+
 = 
-patterns(''
+%5B%0A    url(r'%5Eadmin/', include(admin.site.urls))
 ,%0A    
-    
+url
 (r'%5E
@@ -571,41 +571,13 @@
 /', 
-'django.contrib.auth.views.
 login
-'
 , %7B'
@@ -612,20 +612,19 @@
 %7D),%0A    
-    
+url
 (r'%5Eperm
@@ -642,17 +642,17 @@
 ired/', 
-t
+T
 estClass
@@ -680,10 +680,6 @@
 )),%0A
-    )
+%5D
 %0A

Fix RemovedInDjango110Warning: "django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead." Dropped support for Django < 1.7