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>
19 lines
572 B
Python
19 lines
572 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.navigation import Link
|
|
|
|
link_search = Link(
|
|
kwargs={'search_model': 'search_model.get_full_name'}, text=_('Search'),
|
|
view='search:search'
|
|
)
|
|
link_search_advanced = Link(
|
|
kwargs={'search_model': 'search_model.get_full_name'},
|
|
text=_('Advanced search'), view='search:search_advanced'
|
|
)
|
|
link_search_again = Link(
|
|
kwargs={'search_model': 'search_model.get_full_name'}, keep_query=True,
|
|
text=_('Search again'), view='search:search_again'
|
|
)
|