from django.shortcuts import render
from rest_framework import serializers, viewsets
from pharma_models.categorias.models import Categoria

# Create your views here.
class CategoriaSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Categoria
        fields = ('codigo', 'nombre')


class CategoriaViewSet(viewsets.ModelViewSet):
    queryset = Categoria.objects.all()
    serializer_class = CategoriaSerializer
895f5890e05285ad8b4e3472a06f38f5a6d059be
<mask token>


class CategoriaViewSet(viewsets.ModelViewSet):
    <mask token>
    <mask token>

<mask token>


class CategoriaViewSet(viewsets.ModelViewSet):
    queryset = Categoria.objects.all()
    serializer_class = CategoriaSerializer

<mask token>


class CategoriaSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Categoria
        fields = 'codigo', 'nombre'


class CategoriaViewSet(viewsets.ModelViewSet):
    queryset = Categoria.objects.all()
    serializer_class = CategoriaSerializer

from django.shortcuts import render
from rest_framework import serializers, viewsets
from pharma_models.categorias.models import Categoria


class CategoriaSerializer(serializers.HyperlinkedModelSerializer):


    class Meta:
        model = Categoria
        fields = 'codigo', 'nombre'


class CategoriaViewSet(viewsets.ModelViewSet):
    queryset = Categoria.objects.all()
    serializer_class = CategoriaSerializer

from django.shortcuts import render
from rest_framework import serializers, viewsets
from pharma_models.categorias.models import Categoria

# Create your views here.
class CategoriaSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Categoria
        fields = ('codigo', 'nombre')


class CategoriaViewSet(viewsets.ModelViewSet):
    queryset = Categoria.objects.all()
    serializer_class = CategoriaSerializer