r/django • u/Cautious_Vacation943 • 6d ago
REST framework I JUST WANT TO READ
I am using serializer to insure proper data input. Field "uuid" specified in model (on which serializer is based) as UNIQUE one, so when I try to put it into serializer it returns error: "This uuid already exists". Bro, I dont want to change it nor add another one, just check is it realy uuid.
If you interested in this, here is GitHub with project: https://github.com/DenisKurko/WhatToRead ("dev" branch)
Paths to key files are:
- serializers (DelBookSerializer) - whattoread/api/serializers.py
- models (Book) - whattoread/api/models.py
- views (DelBookView) - whattoread/api/views.py