Refactor the model accesors
Refactor the accesors to behave like methods instead of properties. This means all accesors will be prepended with the string "get_" and will include a set of parenthesis. Improve the ModeAttribute class to use the method's short_description. This commit also adds support for a new method .help_text attribute has been added. Move accessors to their own module, named "methods.py". Remove the PropertyHelper class as the accessors no longer need it. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -5,6 +5,6 @@ TEST_INDEX_LABEL_EDITED = 'test edited label'
|
||||
TEST_INDEX_SLUG = 'test_slug'
|
||||
TEST_METADATA_TYPE_LABEL = 'test metadata label'
|
||||
TEST_METADATA_TYPE_NAME = 'test_metadata_name'
|
||||
TEST_INDEX_TEMPLATE_METADATA_EXPRESSION = '{{ document.metadata_value_of.%s }}' % TEST_METADATA_TYPE_NAME
|
||||
TEST_INDEX_TEMPLATE_METADATA_EXPRESSION = '{{ document.get_metadata("%s").value }}' % TEST_METADATA_TYPE_NAME
|
||||
TEST_INDEX_TEMPLATE_DOCUMENT_LABEL_EXPRESSION = '{{ document.label }}'
|
||||
TEST_INDEX_TEMPLATE_DOCUMENT_DESCRIPTION_EXPRESSION = '{{ document.description }}'
|
||||
|
||||
Reference in New Issue
Block a user