Questions tagged [wagtail]

Wagtail is a Django content management system (CMS), focused on flexibility and user experience. When using this tag, you may also want to add the [django] tag to improve visibility.

Wagtail is a content management system built originally for the Royal College of Art and focused on flexibility and user experience.

Its features include:

  • A fast, attractive editor interface
  • Complete control over design with standard Django templates
  • Configure content types through standard Django models
  • Tightly integrated search (with an Elasticsearch backend for production)
  • Strong document and image management
  • Wide support for embedded content
  • Simple, configurable permissions
  • Support for tree-based content organisation
  • Optional preview->submit->approve workflow
  • Fast out of the box. Varnish-friendly if you need it

Useful links

2300 questions
9
votes
1 answer

Wagtail Views: extra context

I don't found proper way to update Wagtail CMS Page context. For instance i have my homepage model: class HomePage(Page): about = RichTextField(blank=True) date = models.DateField(auto_now=True) content_panels = Page.content_panels + [ …
yanik
  • 798
  • 11
  • 33
9
votes
2 answers

Link to specific page in Wagtail CMS

In Wagtail CMS I don't know how to construct a link to a specific page. I want a (fixed, not authored) link in the templates from my BlogIndexPage to my BlogIndexArchivePage and vice versa. In the official docs pageurl looks promising: {% load…
tombreit
  • 1,199
  • 8
  • 27
9
votes
1 answer

wagtail pages giving `none` url with `live` status

I am having some troubles with wagtail pages. from the shell >>> Site.get_site_root_paths() [(1, u'/home/', u'http://localhost')] >>> BlogPage.objects.all()[0] >>> BlogPage.objects.all()[0].url >>>…
GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
8
votes
3 answers

Replicate part of production django database to local or staging

I have a Django website with 3 environments (Local, Staging, Production). Production contains some data that I don't want my developers to have access to (Personal data and financial data of users). Doing a DB backup restore is not an option for…
Benos
  • 676
  • 7
  • 17
8
votes
1 answer

Multiple select in wagtail admin

When using Django ModelAdmin, I can use: filter_horizontal = ('some_many_to_many_field',) So that, instead of showing the default multiple select widget, it shows a nice interface with two blocks for selecting some values. Is there a similar…
DSLima90
  • 2,680
  • 1
  • 15
  • 23
8
votes
2 answers

Wagtail: Serializing page model

I am using wagtail as a REST backend for a website. The website is built using react and fetches data via wagtails API v2. The SPA website needs to be able to show previews of pages in wagtail. My thought was to override serve_preview on the page…
Richard
  • 14,427
  • 9
  • 57
  • 85
8
votes
2 answers

Get child pages of specified type in Wagtail (or Django)

I have the following code to get the child pages of the current one: {% for subpage in self.get_children %} ... {% endfor %} This is used, for example, to show a gallery of images (each children page have an image). However, this works fine…
Giovanni Benussi
  • 3,102
  • 2
  • 28
  • 30
8
votes
1 answer

Nested categories/InlinePanel(s) in wagtail

I struggle to implement something like "nested categories": PageA: - Cat1 - SubCat1 - SubCat2 - ... - Cat2 - SubCat1 - ... All categories and subcategories should be orderable and editable by an editor. My guess was…
tombreit
  • 1,199
  • 8
  • 27
7
votes
1 answer

Wagtail Custom URL based on slugs using RoutablePageMixin

I would like to change the URL for a blog entry to include the slug for category (@route(r'^([category-slug]/[post-slug] - e.g. localost/health/health_blog_1). How would I change the model for this? class PostPage(RoutablePageMixin, Page): body…
AJH
  • 265
  • 2
  • 12
7
votes
2 answers

How to obtain database id from the struct_block.StructValue in the wagtail block template?

Building a custom template for the wagtail StreamField block I found myself in the situation that I need somehow pass the ID of the current block to the other views. For instance when the URL is clicked in the particular block, the landing page view…
NarūnasK
  • 4,564
  • 8
  • 50
  • 76
7
votes
2 answers

Wagtail moving sqlite to postgres database

The issue I have an empty (migrated) postgres database to which I want to move the data from my sqlite database. What I've tried I export with ./manage.py dumpdata --exclude auth.permission --exclude contenttypes --natural-foreign and…
Joren
  • 3,068
  • 25
  • 44
7
votes
2 answers

How can I add an Upload File field to a Wagtail Form?

I want to make File Upload a possible Wagtail Form field type on form pages. How do I configure the models to make this possible? Please note I am more interested in allowing users to upload document files like PDFs rather than images.
NVN
  • 147
  • 2
  • 7
7
votes
1 answer

Why does Python/Django keep redirecting to url 'catalog'?

I'm stepping into the Python world. First I learned a little Python. Then I learned the basics of Django, and on top of that I'm learning Wagtail (framework for template managing for Django) To learn Django a went through a tutorial to build a site…
user1869935
  • 717
  • 2
  • 10
  • 23
7
votes
3 answers

Extending ImageChooserPanel to allow multiple selections and uploads

I am thinking about migrating an existing webpage to wagtail. However, a major part of the page are image galleries, with a total of some thousand images and some hundred galleries. Furthermore, the page is divided into several sites, with editors…
Patrick Happel
  • 1,336
  • 8
  • 18
7
votes
1 answer

TemplateDoesNotExist error for a simple ModelAdmin example

I've used Wagtail's ModelAdmin on a few other projects with great success, but this is the first time I'm attempting to use it with a model inheriting from Page. I copied the simple example template and removed the parts that didn't relate to my…
Chris May
  • 607
  • 7
  • 12