Quite often we have to write paginated or filtered blocks of information on page. For example, list of similar houses. It's rendered on server first, and later pagination is done with ajax.
In order to make, I used following setup:
So in order to edit one such block, we have to edit three files (apart from template) - tag, view, url.
I got annoyed by this and decided to create a decorator that would automate this process.
With this decorator, you just have to write one function that creates context. Tag and view are generated and registered automatically. Url params like
?obj_id=1 are declared in decorator and are processed automatically.