title: Model is not defined
body: <p>I'm using Flask and Peewee to create models for <code>Users</code> and <code>Appointments</code>, and each of them have a <code>ForeignKeyField</code> referencing each other. The problem is, if I define one above the other, Flask will give me <code>x is not defined</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>class User(Model):
     appointments = ForeignKeyField(Appointment, related_name='appointments')
  
  class Appointment(Model):
     with_doctor = ForeignKeyField(User, related_name='doctor')
  </code></pre>
  
  <p>This would return <code>'User' is not defined</code>. How am I able to fix this problem?</p>