In wagtail/django
how do you make a basic wagtail Page model
, create the html template, and then tell that model to serve as a view for a specific url?
from django.db import models
from wagtail.wagtailcore.models import Page
class MyPage(Page):
title = models.CharField(blank=True, null=True, max_length=255)
#...
I want the url to register like
url(r'^monkey/(?P<slug>[A-Za-z0-9]+)$', ...)
But I don't have a common urls.py
folder its stored outside of the project. I tried using the RoutablePageMixin
, but I believe that serves for subpages. I also know where to store the html template within the structure so that is not a problem.