Skip to content

Instantly share code, notes, and snippets.

@poojansmobio
poojansmobio / serializers.py
Created Sep 4, 2020
The GIST includes code to add schema in API with DRF YASG library.
View serializers.py
from rest_framework import serializers
from .models import *
class DataSerializer(serializers.ModelSerializer):
class Meta:
model = tbl_data_master
View index.html
<!doctype html>
<html>
<head>
<title>{{ site_title }}</title>
</head>
<body>
<h2> {{ indextitle }} </h2>
</body>
</html>