django-cms

How search all text within django cms plugins


I would like to find all instances of a string throughout my entire Django CMS site. I imagined I would find a database table containing the text of all the Text Plugins that I can search through.

I also want to replace the string with a different string, but main issue is just finding where this is stored.


Solution

  • The text content of the Text Plugins is stored in table djangocms_text_ckeditor_text

    And then I was able to use replace():

    UPDATE djangocms_text_ckeditor_text
    SET body = replace(body, 'foobar', 'fizzbuzz')
    WHERE body like '%foobar%'