urlpatterns = patterns("mezzanine.blog.views",
16 url("^%stag/(?P<tag>.*)%s$" % _slashes, "blog_post_list",21 name="blog_post_list_tag"),
18 ...
44)
As we can see they have configured blog URLs to use mezzanine.blog.views. Here we have few functions which are being called by URL dispatcher. one of them is below.
def blog_post_list(request, tag=None, year=None, month=None, username=None,
20 category=None, template="blog/blog_post_list.html",
21 extra_context=None):
22 """
23 Display a list of blog posts that are filtered by tag, year, month,
24 author or category. Custom templates are checked for using the name
25 ``blog/blog_post_list_XXX.html`` where ``XXX`` is either the
26 category slug or author's username if given.
27 """
I would like to override this function so that it will call my function to update context dictionary or pass some more arguments to default function blog_post_list (it's having an argument extra_context so we can use this as external context)
How can I achieve this ?
Please provide complete details like do we have to modify urlpatterns then what should be changed, if we have to change view then what should be change ?