You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by "Marcus Christie (Jira)" <ji...@apache.org> on 2020/02/19 15:43:00 UTC

[jira] [Updated] (AIRAVATA-3290) Ansible: automatically set wagtail site record

     [ https://issues.apache.org/jira/browse/AIRAVATA-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcus Christie updated AIRAVATA-3290:
--------------------------------------
    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.

h5. 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
- [ ] print when site record already exists
- [ ] call automatically when loading a wagtail theme (load_cms_data)

Resources:
- https://www.codista.com/en/blog/create-wagtail-pages-programmatically/

  was:
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.

h5. 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

Resources:
- https://www.codista.com/en/blog/create-wagtail-pages-programmatically/


> Ansible: automatically set wagtail site record
> ----------------------------------------------
>
>                 Key: AIRAVATA-3290
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3290
>             Project: Airavata
>          Issue Type: Bug
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
>
> 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.
> h5. 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
> - [ ] print when site record already exists
> - [ ] call automatically when loading a wagtail theme (load_cms_data)
> Resources:
> - https://www.codista.com/en/blog/create-wagtail-pages-programmatically/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)