from django.conf.urls import include, patterns, url

from rest_framework.routers import SimpleRouter

from .. import views


router = SimpleRouter(trailing_slash=False)
router.register(r'pages', views.PageViewSet)

urlpatterns = patterns('',
    url(r'', include(router.urls)),
)

from django.conf.urls import include, url

from rest_framework.routers import SimpleRouter

from .. import views


router = SimpleRouter(trailing_slash=False)
router.register(r'pages', views.PageViewSet)

urlpatterns = [
    url(r'', include(router.urls)),
]

Purge unnecessary patterns function from urls
Purge unnecessary patterns function from urls

- from django.conf.urls import include, patterns, url
+ from django.conf.urls import include, url
  
  from rest_framework.routers import SimpleRouter
  
  from .. import views
  
  
  router = SimpleRouter(trailing_slash=False)
  router.register(r'pages', views.PageViewSet)
  
- urlpatterns = patterns('',
+ urlpatterns = [
      url(r'', include(router.urls)),
- )
+ ]
  
Purge unnecessary patterns function from urls
## Code Before:
from django.conf.urls import include, patterns, url

from rest_framework.routers import SimpleRouter

from .. import views


router = SimpleRouter(trailing_slash=False)
router.register(r'pages', views.PageViewSet)

urlpatterns = patterns('',
    url(r'', include(router.urls)),
)

## Instruction:
Purge unnecessary patterns function from urls
## Code After:
from django.conf.urls import include, url

from rest_framework.routers import SimpleRouter

from .. import views


router = SimpleRouter(trailing_slash=False)
router.register(r'pages', views.PageViewSet)

urlpatterns = [
    url(r'', include(router.urls)),
]
