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

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'oshi_rest_server.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
)

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

from django.contrib import admin
from rest_framework import routers

admin.autodiscover()

urlpatterns = patterns('',
                       url(r'^', include(routers.urls)),
                       url(r'^admin/', include(admin.site.urls)),
                       url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
)

Configure Django REST framework URLs
Configure Django REST framework URLs

  from django.conf.urls import patterns, include, url
  
  from django.contrib import admin
+ from rest_framework import routers
+ 
  admin.autodiscover()
  
  urlpatterns = patterns('',
+                        url(r'^', include(routers.urls)),
-     # Examples:
-     # url(r'^$', 'oshi_rest_server.views.home', name='home'),
-     # url(r'^blog/', include('blog.urls')),
- 
-     url(r'^admin/', include(admin.site.urls)),
+                        url(r'^admin/', include(admin.site.urls)),
+                        url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
  )
  
Configure Django REST framework URLs
## Code Before:
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'oshi_rest_server.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
)

## Instruction:
Configure Django REST framework URLs
## Code After:
from django.conf.urls import patterns, include, url

from django.contrib import admin
from rest_framework import routers

admin.autodiscover()

urlpatterns = patterns('',
                       url(r'^', include(routers.urls)),
                       url(r'^admin/', include(admin.site.urls)),
                       url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
)
