In order to balance union() requirements for tables with same-fields only, we are adding null fields using values().
These values must be in correct order
"""
# In order to balance union() requirements for tables with same-fields only, we are adding null fields using values(). These values must be in correct order
@@ -632,7 +681,73 @@ class ArticlesMixin(models.Model):
returntag_query
defsearch_articles(
self,
query:str,
page_size:int,
page:int,
previous_query:models.QuerySet|None=None,
):
"""
Uses wagtail search to lookup articles based on a phrase. Accepts a string phrase query + a previous_query param, which can be any articles query that you want to filter by.
Returns a list of articles with models based on from which module is this method run.
To optimize search results we use paginator internally