wagtaildemo | Old example site implemented with Wagtail | Content Management System library
kandi X-RAY | wagtaildemo Summary
kandi X-RAY | wagtaildemo Summary
Old example site implemented with Wagtail. Please see https://github.com/wagtail/bakerydemo for the current demo site
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Export an event .
- Display search results .
- Gets the template context .
- Serve event page .
- Render the top menu .
- Load fixtures .
- Returns a list of events that are descendant of this page .
- Return breadcrumbs .
- Return the children of a parent menu .
- Displays the home page .
wagtaildemo Key Features
wagtaildemo Examples and Code Snippets
Community Discussions
Trending Discussions on wagtaildemo
QUESTION
I have a few questions about this thread: https://groups.google.com/forum/#!topic/wagtail-developers/Z4oaCIJXYuI
I am building a headless Wagtail, with a React-based frontend, that calls Wagtail API in order to parse JSON and display content. Pretty basic.
I was wondering if it was possible to custom the output of streamfield in rest API. A few examples:
- Get a image URL based on this example from wagtaildemo: https://github.com/wagtail/wagtaildemo/blob/api-tweaks/demo/models.py#L713-L716 (I got it working for single URLs)
- PageChooserBlock: get a field from the targetted page
As I read in the topic linked above, the Wagtail API v1 was not ready for custom representation of Streamfield in it. Did it change since v2 ? (I didn't notice anything related in changelogs) If not, does anyone have some tips about how I could achieve such a thing?
I already planned on build a custom image model to get URL by calling api/v2/images/id
, but I would love to get all these into one JSON response .
ANSWER
Answered 2017-Jan-31 at 12:13This isn't a direct answer to your question but the NHS content store app is solving similar problems and may be a useful reference:
https://github.com/nhsuk/nhsuk-content-store
in particular
https://github.com/nhsuk/nhsuk-content-store/blob/master/api/serializers.py
QUESTION
I have an existing website that is a Django App.
I have installed Wagtail, and the Wagtail CMS is now accessible at www.example.com/cms
. Wagtail is working correctly with my database, and all the existing users are visible when I go to settings
and then users
, in the wagtail CMS admin page.
I want to use Wagtail to add blog functionality to my website.
Requirements
- I want any user to be able to create a new blog and add posts to their blog.
- I want the blog created by a user to be visible at
www.example.com/blogs/username/
How can I set Wagtail up to accomplish this?
I have checked the documentation at http://docs.wagtail.io/en/v1.9/ but could not figure out where to start with my modifications. I have also installed the example blog project (https://github.com/wagtail/wagtaildemo) but I was also unable to figure out how to accomplish 1 and 2 above from this.
Any complete answers, or general pointers, very welcome.
...ANSWER
Answered 2018-May-17 at 22:14The permission model built into Wagtail supports this kind of setup: http://docs.wagtail.io/en/stable/topics/permissions.html
After creating the index page for a blog, you'd create a group (Settings -> Groups in the Wagtail admin) for that blog - possibly just containing a single user - and under the 'Page permissions' section, assign it 'add' and 'publish' permission on that index page. Permissions propagate down the tree from that point, and 'add' permission encompasses the ability to edit pages that you've created yourself, so this would have the effect of giving the user control over the subpages of their blog.
This doesn't quite match the setup you've described, since it involves an existing Wagtail admin user having to do the initial setup, rather than users creating their own blog. However, since all of this configuration is done internally by creating / updating standard Django models such as Group
and PagePermission
, it would be possible in principle to script this process - for example, you could implement a Django view for "Set up my blog" on your site front-end, which runs the following steps:
- Create a BlogIndexPage under
/blogs
with a title/slug matchingrequest.user.username
(see https://stackoverflow.com/a/43041179/1853523 for how to create pages programmatically) - Create a user group (
django.contrib.auth.models.Group
) for the current user, and assign themwagtailadmin.access_admin
permission (so that they can log in to Wagtail admin) - Create a
wagtailcore.PagePermission
object corresponding to the newly-created group and blog index page, and 'add' permission; and likewise for 'publish' permission
QUESTION
I have an existing Django Project. I would like to use Wagtail with it. I have followed the instructions here: http://docs.wagtail.io/en/v1.9/getting_started/integrating_into_django.html
However when I try to launch my app, I receive the following error message from uWSGI:-
...ANSWER
Answered 2017-Mar-28 at 03:12It seems that you have two python 2.7 installed, perhaps a built in one, and a manually installed one. The one that shows the import error uses the python located at:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wagtaildemo
You can use wagtaildemo like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page