Skip to content

Instantly share code, notes, and snippets.

@godfather68
Created July 12, 2021 14:00
Show Gist options
  • Save godfather68/9c0644c466c20fe9f2912373c344e672 to your computer and use it in GitHub Desktop.
Save godfather68/9c0644c466c20fe9f2912373c344e672 to your computer and use it in GitHub Desktop.
main urls for the rentals project
from rest_framework import viewsets, mixins, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
# Create your views here.
from core.models import House
from rental import serializers
class HouseViewSet(viewsets.ModelViewSet):
"""Manage Houses viewsets"""
serializer_class = serializers.HouseSerializer
queryset = House.objects.all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment