from django.conf import settings
from django.conf.urls import include, url
# from django.contrib import admin
from django.conf.urls.static import static


from . import views


urlpatterns = [
    ### API ###
    url(r'^$', views.root),
    url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
    url(r'^users/', include('api.users.urls', namespace='users')),
    url(r'^docs/', include('rest_framework_swagger.urls')),
] + static('/static/', document_root=settings.STATIC_ROOT)
from django.conf import settings
from django.conf.urls import include, url, patterns
# from django.contrib import admin
from django.conf.urls.static import static


from . import views


urlpatterns = [
    ### API ###
    url(r'^v2/', include(patterns('',
        url(r'^$', views.root),
        url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
        url(r'^users/', include('api.users.urls', namespace='users')),
        url(r'^docs/', include('rest_framework_swagger.urls')),
    )))] + static('/static/', document_root=settings.STATIC_ROOT)
Change API url prefix to 'v2'
Change API url prefix to 'v2'

  from django.conf import settings
- from django.conf.urls import include, url
+ from django.conf.urls import include, url, patterns
  # from django.contrib import admin
  from django.conf.urls.static import static
  
  
  from . import views
  
  
  urlpatterns = [
      ### API ###
+     url(r'^v2/', include(patterns('',
-     url(r'^$', views.root),
+         url(r'^$', views.root),
-     url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
+         url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
-     url(r'^users/', include('api.users.urls', namespace='users')),
+         url(r'^users/', include('api.users.urls', namespace='users')),
-     url(r'^docs/', include('rest_framework_swagger.urls')),
+         url(r'^docs/', include('rest_framework_swagger.urls')),
- ] + static('/static/', document_root=settings.STATIC_ROOT)
+     )))] + static('/static/', document_root=settings.STATIC_ROOT)
Change API url prefix to 'v2'
## Code Before:
from django.conf import settings
from django.conf.urls import include, url
# from django.contrib import admin
from django.conf.urls.static import static


from . import views


urlpatterns = [
    ### API ###
    url(r'^$', views.root),
    url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
    url(r'^users/', include('api.users.urls', namespace='users')),
    url(r'^docs/', include('rest_framework_swagger.urls')),
] + static('/static/', document_root=settings.STATIC_ROOT)
## Instruction:
Change API url prefix to 'v2'
## Code After:
from django.conf import settings
from django.conf.urls import include, url, patterns
# from django.contrib import admin
from django.conf.urls.static import static


from . import views


urlpatterns = [
    ### API ###
    url(r'^v2/', include(patterns('',
        url(r'^$', views.root),
        url(r'^nodes/', include('api.nodes.urls', namespace='nodes')),
        url(r'^users/', include('api.users.urls', namespace='users')),
        url(r'^docs/', include('rest_framework_swagger.urls')),
    )))] + static('/static/', document_root=settings.STATIC_ROOT)