mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
refactor: Update project settings, URL configurations, client views, and remove requirements.txt.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8
gestaoRaul/categories/api_views.py
Normal file
8
gestaoRaul/categories/api_views.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from rest_framework import viewsets, permissions
|
||||
from .models import Categories
|
||||
from .serializers import CategoriesSerializer
|
||||
|
||||
class CategoriesViewSet(viewsets.ModelViewSet):
|
||||
queryset = Categories.objects.all()
|
||||
serializer_class = CategoriesSerializer
|
||||
permission_classes = [permissions.IsAuthenticatedOrReadOnly]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
7
gestaoRaul/categories/serializers.py
Normal file
7
gestaoRaul/categories/serializers.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from rest_framework import serializers
|
||||
from .models import Categories
|
||||
|
||||
class CategoriesSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Categories
|
||||
fields = '__all__'
|
||||
Reference in New Issue
Block a user