day 78 drf serialized

1, the new django project, registered drf, set internationalization, configuration database (modify database operation module), Custom Model class (set the file type field and option fields), configure the media and open media resource interface

 


2, the base sequence of the class inherit the class Serializer, the object can be serialized into a desired reception data

 

 

 

 

 

 


3, the succession Serializer class of anti-serialization class, you can specify a range of data validation rules provided by the front desk, ensure data security

 


4, master key integration sequences and Anti serialization sequence as one class inherits class ModelSerializer
provided with deserializing serialized field, and distinguishing
provide custom serialization field, and a field custom deserialization
setting system validation rules local and global hook hook validation rules validation rules

Guess you like

Origin www.cnblogs.com/wwei4332/p/11900853.html