mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 09:49:23 +02:00
Activity stream representations for user and favorites
This commit is contained in:
parent
93e4a4f123
commit
691665e3cf
12 changed files with 159 additions and 0 deletions
9
api/funkwhale_api/activity/serializers.py
Normal file
9
api/funkwhale_api/activity/serializers.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from rest_framework import serializers
|
||||
|
||||
|
||||
class ModelSerializer(serializers.ModelSerializer):
|
||||
id = serializers.CharField(source='get_activity_url')
|
||||
# url = serializers.SerializerMethodField()
|
||||
|
||||
def get_url(self, obj):
|
||||
return self.get_id(obj)
|
Loading…
Add table
Add a link
Reference in a new issue