Since a decorator simply a callable which takes a function plus additional
arguments, couldn't you define your own view pretty simply without any
duplication? Something like:

my_blog_post_list =
page_template(blog_post_list).('blog/blog_post_list_page.html')


Note that that is not working code because I don't remember exactly how
decorators with arguments work, but you should be able to do something like
that.

On Sun, Aug 30, 2015 at 12:26 PM, Bartek Sielicki <[email protected]>
wrote:

> So I want to add one line of code (decorator from
> django-endless-pagination app) to one of my mezzanine.blog.views . Just
> like this:
>
>
>
>
> *@page_template('blog/blog_post_list_page.html')def
> blog_post_list(request, tag=None, year=None, month=None,
> username=None,                   category=None,
> template="blog/blog_post_list.html",                   extra_context=None):*
>
> And my question is - what's the proper way of doing it? I know that
> modifying original source file is not good idea. Should I make my own view
> that has the decorator and calls the original view? That would require
> messing with urls though...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to