Why wagtail doesn't recognize my templates?

Viewed 485

I've created a doctrina app, I've been explicit to tell the model where to look for the template:

template = 'doctrina/doctrina_index_page.html'

Why is it saying it can't find it?

enter image description here

doctrina/models.py:

from django.db import models

from wagtail.core.models import Page
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel


class DoctrinaIndexPage(Page):

    template = 'doctrina/doctrina_index_page.html'

    nivel = models.CharField(max_length=255, default='Básico')

    subtitle = models.CharField(max_length=255, default='Publicación reciente')

    body = RichTextField(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('subtitle', classname="full"),
        FieldPanel('body', classname="full")
    ]

this is the main app, where setting are, I've added explicitly the doctrina/templates in the DIRS:

enter image description here

Wagtail Admin:

enter image description here

enter image description here

UPDATE 1:

Sites:

enter image description here

1 Answers

The screenshot of the page listing shows that you have created the Doctrina Elim page directly under the tree root. As the message above that listing says, pages created here will not have an accessible URL unless you set up a corresponding site under Settings -> Sites.

Assuming you want this page to be part of the "Ministerios Internacionales Elim" site, and not a separate site, you should move it to be a child of that homepage.

Related