We tried to create custom fields via a patch. However, when we first install an app, all existing patches get marked as run and will never be executed. Therefore, it might be better to use the after_install hook for this.
To keep after_install clean and have a single point of configuration, I defined the custom fields in hooks.py, a pattern we use a lot in our other projects.
I think that in this setup we won't need the patch anymore. In case it is still needed, it could now be executed by adding the following line to patches.txt:
We tried to create custom fields via a patch. However, when we first install an app, all existing patches get marked as run and will never be executed. Therefore, it might be better to use the
after_install
hook for this.To keep
after_install
clean and have a single point of configuration, I defined the custom fields inhooks.py,
a pattern we use a lot in our other projects.I think that in this setup we won't need the patch anymore. In case it is still needed, it could now be executed by adding the following line to
patches.txt
: