Exclude certain fields from fixtures?

Is there a way to exclude certain fields from fixtures?

Use case: when exporting a Website Theme as a fixture, things like the the generated CSS and the path to the CSS file are exported as well. However, those are auto-generated. The CSS will be generated anyways and the CSS file will not exist at this path on a different machine. The result is that the website loses it’s style after running bench migrate.

@netchampfaris

Hi, has there been any update on this?
I have a use case for this as well (setting just a certain set of values from a single doctype with fixtures, while the others should not be touched by the fixtures at all) and would really appreciate any tip or workaround.

We have partly moved away from fixtures and just write python code that creates the required docs or sets the required values.

1 Like

With patches, I guess?

Yes, with the after_install hook (for new sites) and patches (for existing sites).

1 Like