-urlpatterns = patterns('',
- url(r'^', include('cas_provider.urls')),
- url(r'^accounts/profile', direct_to_template, {'template': 'login-success-redirect-target.html'}),
-
- )
+urlpatterns = [
+ url(r'^admin/', include(admin.site.urls)) if VERSION < (2,) else path('admin/', admin.site.urls),
+ url(r'^', include('cas_provider.urls')),
+ url(r'^accounts/profile', TemplateView.as_view(template_name='login-success-redirect-target.html')),
+]