title: Form fields not displaying when creating a simple form with mongoengine-flask with wtf forms
body: <p>I'm trying to get just a basic model and form to show up with mongoengine and WTF forms, and following the basic instructions from the website aren't working for me. I'm sure it's something simple that is missing, but I've never used flask, mongoengine, or WTFforms, so I'm sort of</p>
  <p>Here is my schema definition in models.seed</p>
  <pre class="lang-py prettyprint-override"><code>class PlandoSeed(db.Document):
      def __init__(self, preset:str='open', num_players:int=2, num_plants:int=1, **entries: dict):
          self.__dict__.update(entries)
          self.preset = preset
          self.num_players = num_players
          self.num_plants = num_plants
  
  
      preset: db.StringField()
      num_players: db.IntField(min=2, max=6)
      num_plants: db.IntField(min=1, max=6)
  
  
  seeds :List[PlandoSeed] = [PlandoSeed('standard',2,2), PlandoSeed('open',4,1), PlandoSeed()]
  
  PlandoSeedForm = model_form(PlandoSeed)
  </code></pre>
  <p>Then this is the route/view that I created in views.py:</p>
  <pre class="lang-py prettyprint-override"><code>@app.route('/seeds/create', methods = ['GET', 'POST'])
  def create_seed():
      form = PlandoSeedForm(request.form)
      if request.method == 'POST' and form.validate():
          # todo
          redirect('/seeds/')
      return render_template('new_seed.jinja', form=form)
  </code></pre>
  <p>Finally, this is my 'new_seed.jinja' template:</p>
  <pre><code>{% extends 'base.jinja' %}
  
  {% block content %}
      &lt;h1&gt;{% block title %} Create Seed {% endblock %}&lt;/h1&gt;
      &lt;form method=&quot;POST&quot; action=&quot;/seeds/create/&quot;&gt;
          {{ form.csrf_token }}
          {% for field in form %}
              {{ field }}
          {% endfor %}
          &lt;input type=&quot;Submit&quot; value=&quot;Go&quot;&gt;
      &lt;/form&gt;
  {% endblock %}
  </code></pre>
  <p>My expectation is that the Create Seed page will have a form with the default input for a text field and integer fields. However, the only field that is in the form object in the jinja template is the CSRF token.<a href="https://i.stack.imgur.com/a6eON.png" rel="nofollow noreferrer">Here is what it looks like.</a></p>
  <p>And this is the generated HTML for the form:</p>
  <pre class="lang-html prettyprint-override"><code>    &lt;h1&gt; Create Seed &lt;/h1&gt;
      &lt;form method=&quot;POST&quot; action=&quot;/seeds/create/&quot;&gt;
          &lt;input id=&quot;csrf_token&quot; name=&quot;csrf_token&quot; type=&quot;hidden&quot; value=&quot;ImZkNzMwMTE1NDJmNDM4NmFjY2EwZDU1ODBjNGJiMjZiMDBhNzFmZGQi.YsRdgg.I8r_Q5RXpmV-r2AzlUNAQ0le7XY&quot;&gt;
          
              &lt;input id=&quot;csrf_token&quot; name=&quot;csrf_token&quot; type=&quot;hidden&quot; value=&quot;ImZkNzMwMTE1NDJmNDM4NmFjY2EwZDU1ODBjNGJiMjZiMDBhNzFmZGQi.YsRdgg.I8r_Q5RXpmV-r2AzlUNAQ0le7XY&quot;&gt;
          
          &lt;input type=&quot;Submit&quot; value=&quot;Go&quot;&gt;
      &lt;/form&gt;
  </code></pre>