I'm a new in Django and Im trying to understand work with Django Rest Framework. What I dont get and I've been trying to find out is how to create a new record in DB which has many-to-many relationship. I can read it and retrieve it in JSON but I can't create or modify it. Django created for me a table for indexes but I have no idea how to work with that. Exmaple: I have a users and user tags. Each user can have more tags and each tag can be assigned to more users.
class User(AbstractBaseUser, PermissionsMixin):
category_tags = models.ManyToManyField(CategoryTag, blank=True, null=True)
What kind of serializer and how actually should I write a serializer so Ican assign some tags to a user. For example when a new user is registered, during registration he will choose some tags which will be assigned to him. I can create a new user but I can't work with m2m (write).
Many thanks.