adhocracy4 icon indicating copy to clipboard operation
adhocracy4 copied to clipboard

make tile_image optional

Open fuzzylogic2000 opened this issue 8 years ago • 2 comments

We have to set tile_image in the IMAGE_ALIASES in the settings. There should be a default/fallback. @slomo

fuzzylogic2000 avatar Jul 07 '17 12:07 fuzzylogic2000

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

slomo avatar Jul 10 '17 12:07 slomo

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.

slomo avatar Jul 10 '17 12:07 slomo