-
Notifications
You must be signed in to change notification settings - Fork 542
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 Site Setting to the demo #395
Comments
I would to like to help on this issue , please provide me more information so I can solve it . |
Hi, I have made a rough sketch of the steps needed to complete this task. Points taken from https://docs.wagtail.org/en/stable/reference/contrib/settings.html. If its valid can I do a PR and add these changes? We create a new app within the bakerydemo project using
Now, create a
Here, I've made MySiteSettings model that extends the Now, to use the new Site Settings, register it with Wagtail
I have extended the ModelAdmin class and set the model attribute to the new setting Finally run the For site-wide settings, change this in For using BaseGenericSetting as logo, we create a new model that inherits from |
Hey @Hanoon02 thanks for this, I realised that the bakery demo site already has a footer model. It's a snippet. Maybe the site setting could be a simple title suffix (that can be translated), one single char field. A second field this model could be a colour field and then this sets the theme colour meta tag. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color Also, I don't think we would need a new app for this, in the base app is fine. Another thing that will need to be in the PR is the fixtures data. |
Site Settings are a key part of many Wagtail sites https://docs.wagtail.org/en/stable/reference/contrib/settings.html
It would be good to have an example in this demo site of a Site setting, ideally one that is translatable.
An example use case is some footer content that uses
BaseSiteSetting
(that can be translated).Additionally, it would be great to have something that uses the
BaseGenericSetting
such as a logo.See also #175
The text was updated successfully, but these errors were encountered: