
from django.views.generic import TemplateView
from django.conf.urls import patterns, url, include
from rest_framework import routers
from apiv1 import views

router = routers.DefaultRouter()
router.register(r'rna', views.RnaViewSet)
router.register(r'accession', views.AccessionViewSet)

urlpatterns = patterns('',
    url(r'^v1/', include(router.urls)),
    url(r'^v1/', include('rest_framework.urls', namespace='rest_framework_v1')),
    url(r'^current/', include(router.urls)),
    url(r'^current/', include('rest_framework.urls', namespace='rest_framework_v1')),
)


from django.views.generic import TemplateView
from django.conf.urls import patterns, url, include
from rest_framework import routers
from apiv1 import views

router = routers.DefaultRouter()
router.register(r'rna', views.RnaViewSet)
router.register(r'accession', views.AccessionViewSet)

urlpatterns = patterns('',
    url(r'^current/', include(router.urls)),
    url(r'^current/', include('rest_framework.urls', namespace='current_api', app_name='current_api')),
    url(r'^v1/', include(router.urls)),
    url(r'^v1/', include('rest_framework.urls', namespace='api_v1', app_name='api_v1')),
)

Add url namespaces and app_names to apiv1
Add url namespaces and app_names to apiv1

  
  from django.views.generic import TemplateView
  from django.conf.urls import patterns, url, include
  from rest_framework import routers
  from apiv1 import views
  
  router = routers.DefaultRouter()
  router.register(r'rna', views.RnaViewSet)
  router.register(r'accession', views.AccessionViewSet)
  
  urlpatterns = patterns('',
+     url(r'^current/', include(router.urls)),
+     url(r'^current/', include('rest_framework.urls', namespace='current_api', app_name='current_api')),
      url(r'^v1/', include(router.urls)),
-     url(r'^v1/', include('rest_framework.urls', namespace='rest_framework_v1')),
+     url(r'^v1/', include('rest_framework.urls', namespace='api_v1', app_name='api_v1')),
-     url(r'^current/', include(router.urls)),
-     url(r'^current/', include('rest_framework.urls', namespace='rest_framework_v1')),
  )
  
Add url namespaces and app_names to apiv1
## Code Before:

from django.views.generic import TemplateView
from django.conf.urls import patterns, url, include
from rest_framework import routers
from apiv1 import views

router = routers.DefaultRouter()
router.register(r'rna', views.RnaViewSet)
router.register(r'accession', views.AccessionViewSet)

urlpatterns = patterns('',
    url(r'^v1/', include(router.urls)),
    url(r'^v1/', include('rest_framework.urls', namespace='rest_framework_v1')),
    url(r'^current/', include(router.urls)),
    url(r'^current/', include('rest_framework.urls', namespace='rest_framework_v1')),
)

## Instruction:
Add url namespaces and app_names to apiv1
## Code After:

from django.views.generic import TemplateView
from django.conf.urls import patterns, url, include
from rest_framework import routers
from apiv1 import views

router = routers.DefaultRouter()
router.register(r'rna', views.RnaViewSet)
router.register(r'accession', views.AccessionViewSet)

urlpatterns = patterns('',
    url(r'^current/', include(router.urls)),
    url(r'^current/', include('rest_framework.urls', namespace='current_api', app_name='current_api')),
    url(r'^v1/', include(router.urls)),
    url(r'^v1/', include('rest_framework.urls', namespace='api_v1', app_name='api_v1')),
)
