title: SLQAlchemy, Flask: AttributeError: 'module' object has no attribute 'create_all'
body: <p>I'm having this issue when creating the tables using SQLAlquemy in Flask, in a virtualenv.</p>
  
  <p>I do:</p>
  
  <pre><code>&gt;&gt;&gt; from mod_db import modelx
  &gt;&gt;&gt; modelx.create_all()
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'module' object has no attribute 'create_all'
  </code></pre>
  
  <p>modelx is:</p>
  
  <pre><code>from flask import Flask
  from flask.ext.sqlalchemy import SQLAlchemy
  
  app = Flask(__name__)
  app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://gaz:123@localhost:5432/test'
  db = SQLAlchemy(app)
  
  db classes...
  </code></pre>
  
  <p>What can it be?</p>
  
  <p>Thanks!</p>