from django.conf.urls import url

from api.collections import views
from website import settings

urlpatterns = []

# Routes only active in local/staging environments
if settings.DEV_MODE:
    urlpatterns.extend([
        url(r'^$', views.CollectionList.as_view(), name='collection-list'),
        url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
        url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
        url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
        url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
    ])

from django.conf.urls import url

from api.collections import views

urlpatterns = [
    url(r'^$', views.CollectionList.as_view(), name='collection-list'),
    url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
    url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
    url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
    url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
]

Remove DEV ONLY on the sub view since the super already has it
Remove DEV ONLY on the sub view since the super already has it

  from django.conf.urls import url
  
  from api.collections import views
- from website import settings
  
- urlpatterns = []
+ urlpatterns = [
+     url(r'^$', views.CollectionList.as_view(), name='collection-list'),
+     url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
+     url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
+     url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
+     url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
+ ]
  
- # Routes only active in local/staging environments
- if settings.DEV_MODE:
-     urlpatterns.extend([
-         url(r'^$', views.CollectionList.as_view(), name='collection-list'),
-         url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
-         url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
-         url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
-         url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
-     ])
- 
Remove DEV ONLY on the sub view since the super already has it
## Code Before:
from django.conf.urls import url

from api.collections import views
from website import settings

urlpatterns = []

# Routes only active in local/staging environments
if settings.DEV_MODE:
    urlpatterns.extend([
        url(r'^$', views.CollectionList.as_view(), name='collection-list'),
        url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
        url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
        url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
        url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
    ])

## Instruction:
Remove DEV ONLY on the sub view since the super already has it
## Code After:
from django.conf.urls import url

from api.collections import views

urlpatterns = [
    url(r'^$', views.CollectionList.as_view(), name='collection-list'),
    url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'),
    url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedNodesList.as_view(), name='linked-nodes'),
    url(r'^(?P<collection_id>\w+)/node_links/$', views.NodeLinksList.as_view(), name='node-pointers'),
    url(r'^(?P<collection_id>\w+)/node_links/(?P<node_link_id>\w+)/', views.NodeLinksDetail.as_view(), name='node-pointer-detail'),
]
