Home > database >  Django/Wagtail : InvalidFilterSpecError at /blog/article-blog-page/ when i refresh my Article Blog P
Django/Wagtail : InvalidFilterSpecError at /blog/article-blog-page/ when i refresh my Article Blog P

Time:10-19

While following the tutorial from Error picture

EDIT 1: my article_blog_page.html:

{% extends "base.html" %}
{% load wagtailimages_tags wagtailcore_tags %}
{% block content %}
{% image self.banner_image fill-1200x300 as banner %}
<img src="{{ banner.url }}" alt="{{ banner.alt }}" style='width: 100%; height: auto;'>
<div class="container mt-5 mb-5">
    <div class="text-center">
        <h1>{% if self.custom_title %}{{ self.custom_title }}{% else %}{{ self.title }}{% endif %}</h1>
        {% if self.subtitle %}
        {% if self.categories.count %}
            <h3>{{ self.subtitle }}</h3>
        {% endif %}
        <div style="padding: 0 20px 20px">
            {% for cat in self.categories.all %}
            <a href="?category={{ cat.slug }}">
                {{ cat.name }}
            </a>{% if not forloop.last %}, {% endif %}
            {% endfor %}
        </div>
        {% endif %}
        <div class="d-flex justify-content-center">
            {% for iter in self.blog_authors.all %}
            {% image iter.author.image fill-50x50 as img %}
            <div>
                <div>
                    <img src="{{ img.url }}" class="rounded-circle" alt="{{ iter.author.name }}">
                </div>
                {% if iter.author.website %}
                <a href="{{ iter.author.website }}">
                    {{ iter.author.name }}
                </a>
                {% else %}
                {{ iter.author.name }}
                {% endif %}
            </div>
            {% endfor %}
        </div>
    </div>
</div>

{% if self.intro_image %}
    <div class="container">
        <div class="row">
            <div class="col-lg-8 offset-lg-2"
                {% image self.intro_image fill 1400x400 as intro_img %}
                <img src="{{ intro_img.url }}" alt="{{ intro_img.alt }}">
            </div>
        </div>
    </div>
{% endif %}

<div class="container">
    <div class="row">
        <div class="col-lg-8 offset-lg-2">
            {% for block in self.content %}
            {% include_block block %}
            {% endfor %}
        </div>
    </div>
</div>
{% endblock %}

CodePudding user response:

{% image self.intro_image fill 1400x400 as intro_img %}

should be

{% image self.intro_image fill-1400x400 as intro_img %}

(note the - after 'fill', rather than the space)

  • Related