title: Pagination in Flask does not work
body: <p>I have a view:</p>
  
  <pre><code>@app.route('/', methods=['GET', 'POST'])
  @app.route('/index', methods=['GET', 'POST'])
  @app.route('/index/&lt;int:page&gt;', methods=['GET', 'POST'])
  def index(page=1):
      posts = Post.query.paginate(page, 3, False).items
      return render_template('index.html', posts=posts)
  </code></pre>
  
  <p>Code template:</p>
  
  <pre><code>    {% if posts %}
      &lt;ol&gt;
      {% for post in posts %}
          &lt;li&gt;{{ post.title }}&lt;/li&gt;  | {{ post.text }} | {{ post.time }}&lt;/li&gt;
      {% endfor %}
      &lt;/ol&gt;
      {% else %}
      &lt;h2&gt;There is no posts&lt;/h2&gt;
      {% endif %}
  
      {% if posts.has_prev %}&lt;a href="{{ url_for('index', page=posts.prev_num) }}"&gt;&lt;&lt; Newer posts&lt;/a&gt;{% else %}&lt;&lt; Newer posts{% endif %} |
      {% if posts.has_next %}&lt;a href="{{ url_for('index', page=posts.next_num) }}"&gt;Older posts &gt;&gt;&lt;/a&gt;{% else %}Older posts &gt;&gt;{% endif %}
  </code></pre>
  
  <p>The problem is that it does not generate me a link to see more posts.</p>