title: How to connect with Django REST framework to front-end
body: <p>I'm new on Django REST Framework. I have an index.html where I have simple form for adding items and back-end with Django. I can't understand, how I can connect index.html to Django REST Framework. 
  I have the next code-files:</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  
  class Book(models.Model):
      title = models.CharField(max_length=100)
      category = models.CharField(max_length=100)
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.views.generic import TemplateView
  from .models import Book
  from rest_framework import viewsets
  from .serializers import BookSerializer
  
  class Index(TemplateView):
      template_name = "index.html"
      def get_context_data(self):
          context = super(Index, self).get_context_data()
          return context
  
  
  class BookViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows users to be viewed or edited.
      """
      queryset = Book.objects.all().order_by('title')
      serializer_class = BookSerializer
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from django.conf.urls import url, include
  from rest_framework import routers
  from myapp import views
  
  router = routers.DefaultRouter()
  router.register(r'books', views.BookViewSet)
  
  # Wire up our API using automatic URL routing.
  # Additionally, we include login URLs for the browsable API.
  urlpatterns = [
      url(r'^', include(router.urls)),
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
      url(r'^$', views.Index, name='index'),
  ]
  </code></pre>
  
  <p><strong>serializers.py</strong></p>
  
  <pre><code>from .models import Book
  from rest_framework import serializers
  
  class BookSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = Book
          fields = ('title','category')
  </code></pre>
  
  <p>And if I run localhost:8000/index I get an error 'Page not found'. I can't understand how correct I should include my html pages to the django code. Should I use a router.register for this? </p>