adhocracy4
adhocracy4 copied to clipboard
make tile_image optional
We have to set tile_image in the IMAGE_ALIASES in the settings. There should be a default/fallback. @slomo
The config is resolved if either the validators or _help_text property is accessed. Since the configuration of the help text property happen in the fields constructor, it will always require the IMAGE_ALIAS to be present.
I tried to solve this by making help_text itself a property. Which works fine when running the webserver, but doesn't work for migrations So I guess we can't make that lazy loaded :cry:. So the options left are:
- provide a default value if the IMAGE_ALIAS can't be found (might be bad if you accidentally misspell you image identifier)
- deal with it and add it to each project
- extend configured image field so that you can explicitly provide a configuration so meinBerlin can solve that in their code
After offline discussion we decided to add the config to each project for now. Longterm we should look either for a way to extend the project model or ship a default config with A4.