From issues-return-17142-archive-asf-public=cust-asf.ponee.io@airavata.apache.org Thu Jan 16 21:30:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id F0D69180661 for ; Thu, 16 Jan 2020 22:30:02 +0100 (CET) Received: (qmail 41358 invoked by uid 500); 16 Jan 2020 21:30:02 -0000 Mailing-List: contact issues-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@airavata.apache.org Received: (qmail 41349 invoked by uid 99); 16 Jan 2020 21:30:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jan 2020 21:30:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0E6B4E2F4F for ; Thu, 16 Jan 2020 21:30:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 582AB780429 for ; Thu, 16 Jan 2020 21:30:00 +0000 (UTC) Date: Thu, 16 Jan 2020 21:30:00 +0000 (UTC) From: "Marcus Christie (Jira)" To: issues@airavata.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRAVATA-3290) Ansible: automatically set wagtail site record MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)