Commits

Stéphane Wirtel  committed 7ae89c4

[FIX] Remove the example in the code of the extenion

  • Participants
  • Parent commits d4d4792

Comments (0)

Files changed (1)

File flaskext/openerp.py

         )
 
 
-def main():
-    from flask import Flask
-    from flaskext.openerp import OpenERP
-
-    class DefaultConfig(object):
-        OPENERP_PROTOCOL = 'netrpc'
-        OPENERP_HOSTNAME = 'localhost'
-        OPENERP_DATABASE = 'openerp'
-        OPENERP_DEFAULT_USERNAME = 'admin'
-        OPENERP_DEFAULT_PASSWORD = 'admin'
-        OPENERP_PORT = 10070
-
-        SECRET_KEY = 'secret_key'
-
-        DEBUG = True
-
-    app = Flask(__name__)
-    app.config.from_object(DefaultConfig())
-    OpenERP(app)
-
-    @app.route('/')
-    def index():
-        proxy = Object(g.openerp_cnx, 'res.users')
-        users = proxy.select([], ['name', 'login'])
-
-        return str(users)
-
-    app.run()
-
-if __name__ == '__main__':
-    main()