Created
July 12, 2021 14:00
-
-
Save godfather68/9c0644c466c20fe9f2912373c344e672 to your computer and use it in GitHub Desktop.
main urls for the rentals project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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