laws-africa / indigo

Indigo Platform for publishing beautiful legislation.
https://laws.africa/indigo
Other
56 stars 25 forks source link

Adding Doc-Types through ENV Variable? #1360

Closed buff0k closed 2 years ago

buff0k commented 2 years ago

The documentation on defining additional AKN DocTypes through ENV variables does not set out the correct formatting required, i.e.

INDIGO.DOCTYPES=('Bill','act')

The above formatting fails due to the use of the brackets which are not permitted in defining ENV variables in Dokku.

Additionally, adding examples might be beneficial? As well as how to add multiple doctypes, especially in an already deployed instance?

longhotsummer commented 2 years ago

For now, new doctypes must be added directly in settings.py, it is not supported to add them through an ENV variable.

The format is a list of tuples, eg [('Act', 'act'), ('Judgment', 'judgment')]. The first item in the tuple is the label for the document type that will be shown in dropdowns, etc. The second item is the FRBR document type specified by Akoma Ntoso.

Not all document types are supported. Slaw only supports act document types.

buff0k commented 2 years ago

Awesome, thank you, I have created a pull request on the documentation. https://github.com/laws-africa/indigo/pull/1364