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
15
votes
3 answers

Pagination in Wagtail

I'm fairly new to Wagtail, and I am in the process of creating a site that will have a Resources (blog) section and I'm not sure how to implement pagination so that there are only 5 posts on each page and the user has to click a number (1, 2, 3,…
kbdev
  • 1,225
  • 1
  • 13
  • 33
14
votes
1 answer

How can I programmatically add content to a Wagtail StreamField?

I'm doing a migration from an old site, and I need to programmatically add raw html to a StreamField on a Wagtail page. How do I do it?
seddonym
  • 16,304
  • 6
  • 66
  • 71
13
votes
4 answers

Programatically add a page to a known parent

I would like to create programatically a sub page for a known parent. How can I do that? The page creation will takes place in a signal receiver: the page is created on publication of another page.
frague
  • 189
  • 1
  • 10
12
votes
3 answers

Custom representation of Streamfield in rest API

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…
fabienheureux
  • 380
  • 2
  • 12
12
votes
2 answers

Wagtail: Display a list of child pages inside a parent page

In Wagtail CMS, I'm trying to create an index page that will display a list of all its child pages along with a featured image associated with each child page. I have created these two page models in models.py: class IndexPage(Page): intro =…
crumbletown
  • 525
  • 1
  • 4
  • 12
10
votes
3 answers

Limit HomePage via parent_page_types to be only available as direct child of root

I use parent_page_types and subpage_types happily all around my Page-models. But I'm stuck at allowing my class HomePage(Page) only as a direct child at root level. Any hints?
tombreit
  • 1,199
  • 8
  • 27
10
votes
2 answers

Making external links open in a new window in wagtail

I recently implemented adding target="_blank" to external links like this: @hooks.register('after_edit_page') def do_after_page_edit(request, page): if hasattr(page, "body"): soup = BeautifulSoup(page.body) for a in…
Chris Barry
  • 4,564
  • 7
  • 54
  • 89
10
votes
5 answers

Django Sass Compressor django_libsass.SassCompiler: command not found

I'm using a Django-Compressor Filter as part of Wagtail (Django variant CMS with super cool UI). Environment is Wagtail 0.2 + Python 2.7 + Django 1.6 + Virtualenv + FastCGI + Apache shared hosting. Issue occurs when trying to access admin/login page…
moshushi
  • 391
  • 2
  • 4
  • 15
9
votes
0 answers

How do I query Wagtail tags without it creating hundreds of queries, n+1 problem?

I have a handful of entries that each has dozens of "tags" when I try to fetch that data it causes hundreds of queries. While using prefetching works on all of my other models and links, it does not seem to work on this. The post below says it has…
9
votes
1 answer

Using Wagtail as an API layer

My company is evaluating Wagtail as a CMS for parts of our website. Currently we're running Python 2.7 and Django 1.5 (don't ask...). We have the ability to run Wagtail on a separate instance which can include the most current versions of…
commadelimited
  • 5,656
  • 6
  • 41
  • 77
9
votes
1 answer

Changing Page type via Wagtail admin

I can choose Page type (Page model) in Wagtail admin on creation. This feature is documented: http://docs.wagtail.io/en/latest/editor_manual/new_pages/selecting_a_page_type.html Is it possible, though, to alter page type in Wagtail admin after the…
paramono
  • 109
  • 1
  • 8
9
votes
1 answer

Wagtail ModelAdmin read only

Using Wagtails Modeladmin: Is there any way to disable edit & delete options leaving only the inspect view? A possible approach that I can think of, is extending the template, removing the edit & delete buttons and then somehow disable the edit and…
Cristián
  • 363
  • 3
  • 13
9
votes
2 answers

Wagtail ModelAdmin inline?

I am using wagtails' ModelAdmin module ( not the same as Django ModelAdmin) to add a custom Order model to the wagtail admin. This model has a foreign key to a custom Address model. I would like to display the Address model as an inline (like in…
jramm
  • 6,415
  • 4
  • 34
  • 73
9
votes
1 answer

Wagtail-approach for comments

We have a blog-like wagtail site and would like to add comments to our post types. Each post is a page object. We thought about using django-contrib-comments or implement an own plain django comments app with ajax. But what would be the…
tombreit
  • 1,199
  • 8
  • 27
9
votes
1 answer

Getting the image source of a dynamic image django / wagtail

I want to add an dynamic wagtail image to my template with the source. When I do: {% load wagtailcore_tags wagtailimages_tags %} {% image page.specific.main_image width-400 %} The output is:
Xiduzo
  • 897
  • 8
  • 24
1
2 3
99 100