[Django]-Custom list permissions in Django REST Framework

3👍

You can overwrite the bank field for your user serializer:

class UserSerializer(serializers.ModelSerializer):
    bank = serializers.PrimaryKeyRelatedField(queryset=Bank.objects.filter(opened=True))

    class Meta:
        model = User

Leave a comment