You can pass a snippet of code that will produce a list of option which 
will populate the metadata with a drop down list. The code is a straight 
Python 'exec' so anything you put here will be execute as-is, so caution, 
only admins have access to change this. Reference code 
here: 
https://github.com/mayan-edms/mayan-edms/blob/master/mayan/apps/metadata/forms.py#L37.
 
The code has a limited namespace with only the User model being passed to 
it, but since it is a settings option you can pass more things to the 
namespace of your 
snippets: 
https://github.com/mayan-edms/mayan-edms/blob/master/mayan/apps/metadata/conf/settings.py.
 
 Hope this helps.

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.

Reply via email to