Managers

evileg_core.managers module

class evileg_core.managers.EActivityManager(*args, **kwargs)[source]

Bases: django.db.models.manager.Manager

EActivityManager is a manager for search in ESNF-C activity models. It is set to EAbstractActivity. It searches content by lookup fields, related lookup fields, and pub_date range in targeted model

by_users(q, select_related=None, only=None)[source]
search(model=None, query=None, in_related=False, date_from=None, date_to=None, approved_dict=None, prefetch_related=None, only=None, **kwargs)[source]
class evileg_core.managers.EPostManager(*args, **kwargs)[source]

Bases: django.db.models.manager.Manager

EPostManager is a manager for search in ESNF-C models. It is set to EAbstractPost. It searches content by lookup fields, related lookup fields, user, and pub_date range

approved()[source]

Method for return approved content, like is published content or moderated content Override it by your needs

Returns

QuerySet of model objects

search(query=None, in_related=False, user=None, approved=True, date_from=None, date_to=None, select_related=None, prefetch_related=None, only=None, order_by=None, distinct=False, annotation=None, **kwargs)[source]

Method for search content

Parameters
  • query – search request

  • in_related – True if you want search content by by fields in related content

  • user – search by user

  • approved – select only approved content

  • date_from – “From date” for pub_date range searching

  • date_to – “To date” for pub_date range searching

  • select_related – list of select related query sets

  • prefetch_related – list of prefetch related query sets

  • order_by – list of fields for ordering

Returns

QuerySet of model objects