Create you own custom settings.py file in mayan/settings directory:
# my_settings.py file
from my_custom_module import my_function
METADATA_AVAILABLE_MODELS = {'my_function': my_function}
and launch Mayan with --settings=mayan.settings.my_settings.py
now my_function should be available in the namespace of your metadata
lookup snippets.
On Tuesday, September 9, 2014 8:59:02 AM UTC-4, Gary D Walborn wrote:
>
> I found a work-around for this, but I think it is also a huge security
> hole in Mayan-EDMS. I think I'll use it, but it will probably go away when
> (if) the security hole is fixed. :-(
>
> On Thursday, September 4, 2014 3:48:38 PM UTC-4, Gary D Walborn wrote:
>>
>> I have written a python function (lets call it 'options') that returns a
>> list of strings. I would like to use this function to populate the
>> drop-down lists in a metadata type. I have tried all sorts of ways to do
>> this, and none of them seem to work. The documentation is very scant on
>> this subject. Can anyone provide any information on how this is supposed
>> to work?
>>
>> Thanks,
>>
>> Gary Walborn
>>
>>
--
---
You received this message because you are subscribed to the Google Groups
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.