wagtail_app_pages | Full MVC support for wagtail pages | Content Management System library
kandi X-RAY | wagtail_app_pages Summary
kandi X-RAY | wagtail_app_pages Summary
This module provides full MVC support for wagtail pages. Using it, it’s possible to extend routing for a page by using url configs and views. It addresses the same problem solved by wagtail’s own RoutablePageMixin, without breaking clean MVC principles.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the URL for the given page
- Reverse a URL
- Extract query params from a URL
- Serve preview
- Serve the page instance
- Route to the application
wagtail_app_pages Key Features
wagtail_app_pages Examples and Code Snippets
Community Discussions
Trending Discussions on wagtail_app_pages
QUESTION
I have a django model of data for several locations that I need to generate pages from in wagtail. Like a blog, I need a listing page and detail pages.
I followed this documentation: https://wagtail-app-pages.readthedocs.io/en/latest/index.html
models.py
...ANSWER
Answered 2020-Jul-05 at 12:11The examples in the docs do not properly demonstrate the way URLs work with this library.
Wagtail sets the URL for the listing page. I created a page using the LocationPage template, named it 'Locations', and it is accessible at '/locations'. My url.conf was wrong. I had the listing page set to r'^locations/?$'.
wagtail app pages does not like regex for some reason. I'm to green to understand why, but it is a no no.
what I choose as my LocationListView slug has to be added to the path of the wagtail page URL. removing the regex, if I use 'locations/' in my URL conf, then my page is accessible at 'locations/locations/'.
I think the documentation assumes that your wagtail page URL will be root (which wouldn't make sense) so the blog listing page would be accessible at root/articles. but, as far as I know, that would cause your root URL to be claimed but unused, so you wouldn't have a home page. Very confusing.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wagtail_app_pages
You can use wagtail_app_pages 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