airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (Jira)" <j...@apache.org>
Subject [jira] [Commented] (AIRAVATA-3290) Ansible: automatically set wagtail site record
Date Thu, 16 Jan 2020 21:30:00 GMT

    [ https://issues.apache.org/jira/browse/AIRAVATA-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017502#comment-17017502
] 

Marcus Christie commented on AIRAVATA-3290:
-------------------------------------------

Need to figure out the root page of the site. I think we can walk the hierarchy and look for
the first page that is one of our custom Page subclasses.

{noformat}
from wagtail.core.models import Page, Site 
from django_airavata.wagtailapps.base.models import HomePage, BlankPage
r = Page.get_root_nodes() 
isinstance(r[0], HomePage)
r = r[0].get_children()
{noformat}

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



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

Mime
View raw message