Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3290

Ansible: automatically set wagtail site record

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Django Portal
    • None

    Description

      Automatically set a default wagtail site record with the correct domain name and site name.

      Wagtail preview doesn't work until the site record has the correct domain name of the site.

      Another option is to update the load_cms_data command to do this. Ansible only creates the database and the wagtailcore_site table isn't there until migrations run, and the record actually gets created by load_cms_data.

      TODO
      • [x] Test what happens when there is already a default site, does it need to be deleted first?
        • yes any existing default site needs to be deleted first
      • [x] Test when there is already a site record but not the default one
        • non-default record doesn't seem to matter
      • [x] print when site record already exists
      • [x] call automatically when loading a wagtail theme (load_cms_data)
      • [x] when there is no root page, won't be able to create the default site record, but also shouldn't allow deleting the old one and leaving it deleted (need to run in transaction)
      • [x] add set_wagtail_site to Ansible script

      Resources:

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            marcuschristie Marcus Christie
            marcuschristie Marcus Christie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment