Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Generic and Site settings models. Fix #395 #419

Merged

Conversation

Morsey187
Copy link
Contributor

Resolves issue: 395

Adds:

  • SiteSettings extending from Wagtail's BaseSiteSetting class
    • New field title_suffix which is used to replace static text in the base.html's title_suffix block
  • GenericSettings extending from Wagtail's BaseGenericSetting class
    • New fieldsgithub_url, twitter_url, organisation_url which are now used to conditionally display the footer icons and populate their href attributes.
  • Fixture update for bakerydemo.json i.e. load_initial_data

@@ -1444,6 +1365,13 @@
"workflow": 1
}
},
{
"model": "wagtailcore.workflowcontenttype",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell this is a new model from a minor wagtail release that just hasn't been included until now

@@ -3587,6 +3515,22 @@
"file_hash": ""
}
},
{
"model": "wagtailusers.userprofile",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this was added, doesn't seem to break anything but can't figure out how I managed to add it in either.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that for some reason we didn’t have a Wagtail user profile instance in the fixtures until now. Perhaps this gets created only when accessed the first time – which we now do on every page as part of determining which theme to show the UI in.

Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looking great @Morsey187! The fixtures changes surprise me a bit but yeah we don’t update the fixtures that often so I’ll probs just split the unrelated changes to a different commit and move on.

@thibaudcolas thibaudcolas force-pushed the feature/add-site-and-generic-settings branch from 4c5571c to d9e8ab3 Compare June 22, 2023 15:38
@thibaudcolas thibaudcolas changed the title Add Generic and Site settings models Add Generic and Site settings models. Fix #395 Jun 22, 2023
@thibaudcolas thibaudcolas merged commit 6831b21 into wagtail:main Jun 22, 2023
@lb-
Copy link
Member

lb- commented Jun 22, 2023

Thanks @Morsey187 and @thibaudcolas - this is a really helpful addition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants