Sort methods. Update use of .filter_by_access() to .restrict_queryset(). Change the method to so the final object filtering. Instead of expressing the pk list and remove the duplicated using a set, pass the queryset as a subquery to the object filter. This moves the processing to the database instead of holding a list of an unknown number of primary keys in the memory. Add keyword arguments. Update tests to use the latest user test case mixin interface. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
13 lines
366 B
Python
13 lines
366 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.smart_settings import Namespace
|
|
|
|
namespace = Namespace(label=_('Search'), name='dynamic_search')
|
|
|
|
setting_limit = namespace.add_setting(
|
|
global_name='SEARCH_LIMIT', default=100,
|
|
help_text=_('Maximum amount search hits to fetch and display.')
|
|
)
|