Does Wagtail only use the slug in Promote Tab, or should I set the url in urls.py?
I'm using Wagtail, I've 2 pages:
a) Ministerios Internacionales Elim
b) Doctrina Elim
I want to set a as homepage, and b to:
http://127.0.0.1:8000/doctrina-elim/
Right now doctrina/urls.py is empty :(
I've this model in doctrina/models.py:
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")
]
The view has this (doctrina/views.py):
from django.shortcuts import render
# Create your views here.
def home_page(response):
return render(response, "home/home_page.html")
# Create your views here.
def doctrina_index_page(response):
return render(response, "doctrina/doctrina_index_page.html")
In promote tab, it has this url:
doctrina-elim
But entering that after the hostname gives 404, why?
Structure:
-doctrina
|__pycache.py_
|__migrations.py
|__templates
|___init__.py
|_admin.py
|_apps.py
|_models.py
|_test.py
|_urls.py
|_views.py
-elim
|__pycache_.py
|_settings.py
|_static
|_templates
|___init__.py
|_urls.py
|_wsgi.py
-home
|__pycache_.py
|_migrations.py
|_static
|_templates \ home
|_home_page.html
|_welcome_page.html
|___init__.py
|_models.py
|_urls.py
|_views.py
I can only access my Page models when setting them as sites, and visit the "/" home.

