from flask import Flask
from flask.ext.pymongo import PyMongo

app = Flask(__name__)

# Start MongoDB
app.config['MONGO_DBNAME'] = 'tickettweets'
mongo = PyMongo(app, config_prefix='MONGO')

# Start the Twitter stream
from app import stream
stream.main()

# import after tickettweets to prevent circular import
from app import views

@@ -26,18 +26,8 @@
 rom 
-flask.ext.
 pymo
@@ -37,23 +37,26 @@
  import 
-PyMongo
+Connection
 %0A%0Aapp = 
@@ -92,235 +92,204 @@
 oDB%0A
-app.config%5B'MONGO_DBNAME'%5D = 'tickettweets'%0Amongo = PyMongo(app, config_prefix='MONGO')%0A%0A# Start the Twitter stream%0Afrom app import stream%0Astream.main()%0A%0A# import after tickettweets to prevent circular import%0Afrom app import views
+conn = Connection()%0Adb = conn.tickettweets%0Acollection = db.tweets%0A%0A# import after app to prevent circular import%0Afrom app import views%0A%0A# Start the Twitter stream%0Afrom app import stream%0Astream.main()
 %0A

change from flask-pymongo to pymongo