Skip to content

WIP: added a field to indicate whether a Figure needs compiling with inkscape

username-removed-964623 requested to merge 174-png-figures into master

Closes #174 (closed) @dolfim I realized there are some places where it's not entirely trivial to change the Figure such that it also accepts a non-compiled figure:

  • the content should be a binary blob, not text
  • the file ending is not saved

Would it make sense to create two classes CompiledFigure and RawFigure, to clearly distinguish the two? Some code might be duplicated in the end, but I think it could be the cleaner solution.

I think in the Figure management page we could separate the two, but I think they should have shared indices (PK), to simplify how this is handled on the QML side. Do you know if this is somehow easily possible with Django models? Something like a SQL view? Otherwise we could just have a prefix for the PK (like cmp- and raw-) to identify the two.

Merge request reports