</code></pre><h3id="views-py"tabindex="-1">Views.py <aclass="header-anchor"href="#views-py"aria-label="Permalink to “Views.py”"></a></h3><pre><code>@permission_classes([])
@authentication_classes([])
class VideosAPIView(generics.ListAPIView):
serializer_class = VideoSerializer
def get_queryset(self):
queryset = Video.objects.all()
lang = self.request.query_params.get('q', None)
</code></pre><h1id="apis-the-django-rest-framework"tabindex="-1">APIS & the Django REST Framework <aclass="header-anchor"href="#apis-the-django-rest-framework"aria-label="Permalink to “APIS & the Django REST Framework”"></a></h1><hr><p>As mentioned earlier, we aren't bothering with Django Templates, rather all of our data will be consumed by a JavaScript client created using the VueJS framework.</p><p>Our Django server's duty is to serve API endpoints, and we do this using the <ahref="https://www.django-rest-framework.org/"target="_blank"rel="noreferrer">Django REST Framework</a> .</p><p><strong>REST</strong> stands for <ahref="https://en.wikipedia.org/wiki/Representational_state_transfer"target="_blank"rel="noreferrer">Representation State Transfer</a> ; and it is a style of software architecture to define how data is transferred between web services.</p><p>Other architectures include <ahref="https://en.wikipedia.org/wiki/SOAP"target="_blank"rel="noreferrer">SOAP</a> and <ahref="https://en.wikipedia.org/wiki/GraphQL"target="_blank"rel="noreferrer">GraphQL</a> .</p><h3id="serializers-py"tabindex="-1">Serializers.py <aclass="header-anchor"href="#serializers-py"aria-label="Permalink to “Serializers.py”"></a></h3><p>RESTful frameworks operate by serializing, or conforming, data into a known structure and transferring this known structure between web services. And to do that we use what is called a serializer.</p><p>Just as our models define how the data is stored in our databases, serializers define the forme and shape of data that is transferred via API calls to our RESTful API endpoints.</p><pre><code>class PostSerializer(serializers.ModelSerializer):
class Meta:
model = Post
fields = '__all__'
# fields = ('id', 'name',)
</code></pre><h1id="clone-sf-project"tabindex="-1">Clone SF Project <aclass="header-anchor"href="#clone-sf-project"aria-label="Permalink to “Clone SF Project”"></a></h1><hr><pre><code>git clone
git clone
</code></pre><h1id="writing-your-first-web-scraper"tabindex="-1">Writing your first web-scraper <aclass="header-anchor"href="#writing-your-first-web-scraper"aria-label="Permalink to “Writing your first web-scraper”"></a></h1><hr><h1id="attach-scraper-to-orm"tabindex="-1">Attach Scraper to ORM <aclass="header-anchor"href="#attach-scraper-to-orm"aria-label="Permalink to “Attach Scraper to ORM”"></a></h1><hr><p>Learn pupa etc …</p><pre><code>pupa init NewCity
</code></pre><h1id="your-first-pull-request"tabindex="-1">Your First Pull Request <aclass="header-anchor"href="#your-first-pull-request"aria-label="Permalink to “Your First Pull Request”"></a></h1><hr><p>Fork the project</p><h1id="exploring-the-sf-project"tabindex="-1">Exploring the SF Project <aclass="header-anchor"href="#exploring-the-sf-project"aria-label="Permalink to “Exploring the SF Project”"></a></h1><hr></div></div></main><footerclass="VPDocFooter"data-v-7011f0d8data-v-e257564d><!--[--><!--]--><!----><navclass="prev-next"aria-labelledby="doc-footer-aria-label"data-v-e257564d><spanclass="visually-hidden"id="doc-footer-aria-label"data-v-e257564d>Pager</span><divclass="pager"data-v-e257564d><aclass="VPLink link pager-link prev"href="/rebel_coding/v2Orient.html"data-v-e257564d><!--[--><spanclass="desc"data-v-e257564d>Previous page</span><spanclass="title"data-v-e257564d>Planning Our App</span><!--]--></a></div><divclass="pager"data-v-e257564d><aclass="VPLink link pager-link next"href="/rebel_coding/step6.html"data-v-e257564d><!--[--><spanclass="desc"data-v-e257564d>Next page</span><spanclass="title"data-v-e257564d>Step 2: Client</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>