def get_article_placeholders(self, article):
        """
        In the project settings set up the variable

        CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST = {
            'include': [ 'slot1', 'slot2', etc. ],
            'exclude': [ 'slot3', 'slot4', etc. ],
        }

        or leave it empty

        CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST = {}
        """
        placeholders_search_list = getattr(settings, 'CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST', {})

        included = placeholders_search_list.get('include', [])
        excluded = placeholders_search_list.get('exclude', [])
        diff = set(included) - set(excluded)
        if diff:
            return article.placeholders.filter(slot__in=diff)
        elif excluded:
            return article.placeholders.exclude(slot__in=excluded)
        else:
            return article.placeholders.all()
def get_article_placeholders ( self , article ) : placeholders_search_list = getattr ( settings , 'CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST' , { } ) included = placeholders_search_list . get ( 'include' , [ ] ) excluded = placeholders_search_list . get ( 'exclude' , [ ] ) diff = set ( included ) - set ( excluded ) if diff : return article . placeholders . filter ( slot__in = diff ) elif excluded : return article . placeholders . exclude ( slot__in = excluded ) else : return article . placeholders . all ( )
In the project settings set up the variable

        CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST = {
            'include': [ 'slot1', 'slot2', etc. ],
            'exclude': [ 'slot3', 'slot4', etc. ],
        }

        or leave it empty

        CMS_ARTICLES_PLACEHOLDERS_SEARCH_LIST = {}