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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.