Using Django Rest Framwork, I want to set a field that can not be null in the Database, but that's not included in the fields tuple on the Meta class, before i actually save the model that the ModelSerializer manages.
In my ViewSet, I define perform_create and want to do something like this:
serializer.fields.new_field = new_field_id
where new_field is a Foreign Key on my model and new_field.id is the id of the model i just fetched using a value set on the cookie.
Does anyone know a clean solution to this?
Thanks!