Changes between Version 6 and Version 7 of Ticket #10244, comment 19


Ignore:
Timestamp:
Jun 7, 2022, 7:26:44 AM (2 years ago)
Author:
dennisvang

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10244, comment 19

    v6 v7  
    1111We can specify `null=True`, and we can assign `None` to the field, but this is stored as a `FieldFile` with `name=None` (initially) on the python side, and it is stored as an empty string `''` in the database. After e.g. `refresh_from_db`, the `FieldFile.name` will also be an empty string, instead of `None`.
    1212
    13 Basically, this passes:
     13Basically, the passes, where `my_filefield` is a `FileField` with `null=True`:
    1414
    1515{{{
Back to Top