0

I'm new to Django, and am using Mezzanine in order to create a basic blog website. One thing I wanted to achieve was using the supplied blog_post_list template as a base for the homepage. In the Mezzanine docs, it explains how to do this, however, I want to make changes to this template. As such, I followed the instructions of creating a local copy of the mezzanine blog home page template and editing the urlpatterns in urls.py to point to the local copy of the file. However, when I try to render this home page in my browser, the following error occurs:

Error during template rendering at Line 145 in (local copy of) blog_post_list.html: {% pagination_for blog_posts %}

For reference, here is the html file in question: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/templates/blog/blog_post_list.html

The pages have been copied and unedited from Mezzanines core, so why does it work when being opened in Mezzanine's core, but not when in my local project directory?

1 Answers1

0

In urls.py,

url("^$", direct_to_template, {"template": "blog/blog_post_list.html"}, name="home"),

should be

url("^$", blog_post_list, name="home"),

also,

from mezzanine.blog.views import blog_post_list
Thomas
  • 11,757
  • 4
  • 41
  • 57