from django.conf.urls import include, url
from django.contrib import admin

from . import views


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url('foo/', views.MyView.as_view(), name='class-view'),
    url('bar/', views.MyAPIView.as_view(), name='api-view'),
    url('', views.my_view, name='function-view'),
]

from django.conf.urls import include, url
from django.contrib import admin

from . import views
from incuna_test_utils.compat import DJANGO_LT_17


if DJANGO_LT_17:
    admin.autodiscover()


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url('foo/', views.MyView.as_view(), name='class-view'),
    url('bar/', views.MyAPIView.as_view(), name='api-view'),
    url('', views.my_view, name='function-view'),
]

Add compatibility with django < 1.7
Add compatibility with django < 1.7

  from django.conf.urls import include, url
  from django.contrib import admin
  
  from . import views
+ from incuna_test_utils.compat import DJANGO_LT_17
+ 
+ 
+ if DJANGO_LT_17:
+     admin.autodiscover()
  
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url('foo/', views.MyView.as_view(), name='class-view'),
      url('bar/', views.MyAPIView.as_view(), name='api-view'),
      url('', views.my_view, name='function-view'),
  ]
  
Add compatibility with django < 1.7
## Code Before:
from django.conf.urls import include, url
from django.contrib import admin

from . import views


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url('foo/', views.MyView.as_view(), name='class-view'),
    url('bar/', views.MyAPIView.as_view(), name='api-view'),
    url('', views.my_view, name='function-view'),
]

## Instruction:
Add compatibility with django < 1.7
## Code After:
from django.conf.urls import include, url
from django.contrib import admin

from . import views
from incuna_test_utils.compat import DJANGO_LT_17


if DJANGO_LT_17:
    admin.autodiscover()


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url('foo/', views.MyView.as_view(), name='class-view'),
    url('bar/', views.MyAPIView.as_view(), name='api-view'),
    url('', views.my_view, name='function-view'),
]
