Instead of inserting the path of the apps into the Python app, the apps are now referenced by their full import path. This solves name clashes with external or native Python libraries. Example: Mayan statistics app vs. Python new statistics library. Every app reference is now prepended with 'mayan.apps'. Existing config.yml files need to be updated manually. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
22 lines
557 B
Python
22 lines
557 B
Python
from __future__ import absolute_import, unicode_literals
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.dynamic_search.classes import SearchModel
|
|
|
|
from .permissions import permission_role_view
|
|
|
|
role_search = SearchModel(
|
|
app_label='permissions', model_name='Role',
|
|
permission=permission_role_view,
|
|
serializer_string='mayan.apps.permissions.serializers.RoleSerializer'
|
|
)
|
|
|
|
role_search.add_model_field(
|
|
field='label', label=_('Label')
|
|
)
|
|
|
|
role_search.add_model_field(
|
|
field='groups__name', label=_('Group name')
|
|
)
|