title: Pagination in django mezzanine
body: <p>I can't figure out how to use mezzanine pagination for my custom models.</p>
  
  <p>The docs say:</p>
  
  <blockquote>
    <p>mezzanine.core.templatetags.mezzanine_tags.pagination_for(parser, token)
    Include the pagination template and data for persisting querystring in pagination links. Can also contain a comma separated string of var names in the current querystring to exclude from the pagination links, via the exclude_vars arg.</p>
  </blockquote>
  
  <p>As far as I understand in my template file I have to include <code>mezzanine_tags</code> and call <code>{% pagination_for parser token %}</code>.</p>
  
  <p>I don't really understand what are parser and token. I looked at the source code of that template tag and it it as follows:</p>
  
  <pre><code>@register.inclusion_tag("includes/pagination.html", takes_context=True)
  def pagination_for(context, current_page, page_var="page", exclude_vars=""):
      """
      Include the pagination template and data for persisting querystring
      in pagination links. Can also contain a comma separated string of
      var names in the current querystring to exclude from the pagination
      links, via the ``exclude_vars`` arg.
      """
      querystring = context["request"].GET.copy()
      exclude_vars = [v for v in exclude_vars.split(",") if v] + [page_var]
      for exclude_var in exclude_vars:
          if exclude_var in querystring:
              del querystring[exclude_var]
      querystring = querystring.urlencode()
      return {
          "current_page": current_page,
          "querystring": querystring,
          "page_var": page_var,
      }
  </code></pre>
  
  <p>Buy looking at usage I think that token is just number denoting current page. But how do I get <code>context</code> in the template?</p>