application api queryset
This commit is contained in:
parent
8890777237
commit
c34c449de3
2 changed files with 4 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ class ApplicationSerializer(serializers.ModelSerializer):
|
||||||
model = Application
|
model = Application
|
||||||
fields = ('uuid',
|
fields = ('uuid',
|
||||||
'name',
|
'name',
|
||||||
|
'avatar',
|
||||||
'client_id',
|
'client_id',
|
||||||
'user',
|
'user',
|
||||||
'allowed_scope',
|
'allowed_scope',
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ class ApplicationViewSet(ReadOnlyModelViewSet):
|
||||||
required_alternate_scopes = {
|
required_alternate_scopes = {
|
||||||
"GET": [['accounts.applications:list_or_retrieve']],
|
"GET": [['accounts.applications:list_or_retrieve']],
|
||||||
}
|
}
|
||||||
def get_queryset(self):
|
# def get_queryset(self):
|
||||||
user = self.request.user
|
# user = self.request.user
|
||||||
return Application.objects.filter(user=user).all()
|
# return Application.objects.filter(user=user).all()
|
||||||
|
|
||||||
@action(detail=True, permission_classes=[AllowAny])
|
@action(detail=True, permission_classes=[AllowAny])
|
||||||
def avatar(self, request, pk=None):
|
def avatar(self, request, pk=None):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue