from django.conf.urls import include, url
from django.contrib import admin

from rest_framework_nested import routers

from social_website_django_angular.views import IndexView
from authentication.views import AccountViewSet

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/v1/', include(router.urls)),
    url('^.*$', IndexView.as_view(), name='index')
]

from django.conf.urls import include, url
from django.contrib import admin

from rest_framework_nested import routers

from social_website_django_angular.views import IndexView
from authentication.views import AccountViewSet, LoginView

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/v1/', include(router.urls)),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url('^.*$', IndexView.as_view(), name='index')
]

Add login endpoint to URLs
Add login endpoint to URLs

  from django.conf.urls import include, url
  from django.contrib import admin
  
  from rest_framework_nested import routers
  
  from social_website_django_angular.views import IndexView
- from authentication.views import AccountViewSet
+ from authentication.views import AccountViewSet, LoginView
  
  router = routers.SimpleRouter()
  router.register(r'accounts', AccountViewSet)
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^api/v1/', include(router.urls)),
+     url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
      url('^.*$', IndexView.as_view(), name='index')
  ]
  
Add login endpoint to URLs
## Code Before:
from django.conf.urls import include, url
from django.contrib import admin

from rest_framework_nested import routers

from social_website_django_angular.views import IndexView
from authentication.views import AccountViewSet

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/v1/', include(router.urls)),
    url('^.*$', IndexView.as_view(), name='index')
]

## Instruction:
Add login endpoint to URLs
## Code After:
from django.conf.urls import include, url
from django.contrib import admin

from rest_framework_nested import routers

from social_website_django_angular.views import IndexView
from authentication.views import AccountViewSet, LoginView

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/v1/', include(router.urls)),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url('^.*$', IndexView.as_view(), name='index')
]
