db.models.BinaryField

class BinaryField(**options) [source]

A field to store raw binary data. It only supports bytes assignment. Be aware that this field has limited functionality. For example, it is not possible to filter a queryset on a BinaryField value. It is also not possible to include a BinaryField in a ModelForm.

Abusing BinaryField

Although you might think about storing files in the database, consider that it is bad design in 99% of the cases. This field is not a replacement for proper static files handling.

doc_Django
2016-10-09 18:35:13
Comments
Leave a Comment

Please login to continue.