Supports profile updates
only background for now, but hey.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from .track import TrackSerializer
|
||||
from .artist import ArtistSerializer
|
||||
from .user import UserSerializer
|
||||
from .album import AlbumSerializer
|
||||
from .profile import ProfileSerializer, BackgroundSerializer
|
||||
from .track import *
|
||||
from .artist import *
|
||||
from .user import *
|
||||
from .album import *
|
||||
from .profile import *
|
||||
from .vote import *
|
||||
|
||||
@@ -12,3 +12,9 @@ class ProfileSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Profile
|
||||
fields = '__all__'
|
||||
|
||||
class ProfileUpdateSerializer(serializers.ModelSerializer):
|
||||
background = serializers.PrimaryKeyRelatedField(many=False, queryset=Background.objects.all())
|
||||
class Meta:
|
||||
model = Profile
|
||||
fields = ['background']
|
||||
|
||||
Reference in New Issue
Block a user