Hi, I am trying to create new fields in a different python file and import it in invenio.cfg but i am unable to understand where exactly i should i add this file. I am following this page but this one is more for the fields that can be created inside the invenio.cfg file. Is there any documentation on situations where the fields are coded in a different file? Create new type of field - Turn-key research data management repository
Hey there
,
invenio.cfg is actually just a python file with a different file ending, so you can do imports in it and import your code defined elsewhere. What a lot of people do is use their site package (https://github.com/inveniosoftware/cookiecutter-invenio-rdm/tree/master/{{cookiecutter.project_shortname}}/site) to define things like that and then import them it in their invenio.cfg. Use your site’s package name (what is used here: https://github.com/inveniosoftware/cookiecutter-invenio-rdm/blob/master/{{cookiecutter.project_shortname}}/site/setup.cfg#L3) in that case: from <cookiecutter.project_shortname> import Foo.
Also, you will have a better response rate for questions on our Discord server actually: inveniosoftware . This discourse forum is not as watched. More users are there to help out and share their similar experience.
cheers,