title: NotImplementedError: Operator 'getitem' is not supported on this expression (Flask error)
body: <p>I've been following <a href="https://www.youtube.com/watch?v=dam0GPOAvVI&amp;t=2s" rel="nofollow noreferrer">this flask web app tutorial</a> and am trying to rework things to my aim. I'm going to try my best to be as explicit as possible.</p>
  <pre><code>    &lt;ul class=&quot;list-group list-group-flush&quot; id=&quot;notes&quot;&gt;
    {% for queen in rote.comment %}
    &lt;li class=&quot;list-group-item&quot;&gt;
      {{ queen }}
      &lt;!--&lt;button type=&quot;button&quot; class=&quot;close&quot; onClick=&quot;deleteNote({{ queen.id }})&quot;&gt;
        &lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;
      &lt;/button&gt;--&gt;
    &lt;/li&gt;
    {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  <p>With the above segment, I want for all logged in users to be able to access all stored notes on the database irrespective of the fact they made them or not.</p>
  <pre><code>    @views.route('/', methods=['GET', 'POST']) #note send
  @login_required
  def home():
      if request.method == 'POST':
          note = request.form.get('note')
          section = request.form.get('section')
  
          if len(note) &lt; 1:
              flash('Note is too short!', category='error')
          else:
              new_note = Note(comment=note, user_id=current_user.id, section=section)
              db.session.add(new_note)
              db.session.commit()
              flash('Note added!', category='success')
  
      return render_template(&quot;home.html&quot;, user=current_user, **rote=Note**)
  </code></pre>
  <p>I have this code portion in my &quot;views.py&quot; file. My guess is that it'll store the content of the Note class in that rote variable but I'm apparently wrong because it's been giving me a <strong>NotImplementedError: Operator 'getitem' is not supported on this expression</strong> error.</p>