Skip to content

Commit

Permalink
add config for IP robot: HACK
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrun committed Apr 2, 2015
1 parent cde0d61 commit b444e44
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions backend/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@ Installation
pip install -f requirements.txt
* HACK : IP du ROBOT en dur !!!!, il faut la changer dans plugins/robotw.py

* Démarrage du serveur

.. code-block:: bash
python manage.py runserver
* Démarrage avec connexion autre que localhost

.. code-block:: bash
python manage.py runserver -h 0.0.0.0
Architecture
------------
Expand Down
5 changes: 3 additions & 2 deletions backend/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
def create_app(config_name):
app = Flask(__name__, static_url_path='/static')

client = InfluxDBClient('192.168.3.32', 8086, 'root', 'root', 'domohack')
#client = InfluxDBClient('192.168.3.32', 8086, 'root', 'root', 'domohack')


app.config.from_object(config[config_name])
api = restful.Api(app)
plugins = PluginManagerSingleton.get()
plugins.setPluginPlaces(
Expand All @@ -59,8 +60,8 @@ def create_app(config_name):
plugins.collectPlugins()
for plugin in plugins.getAllPlugins():
plugins.activatePluginByName(plugin.name)
plugin.plugin_object.register_app(app)
api.add_resource(plugin.plugin_object.__class__, plugin.plugin_object.route())
app.config.from_object(config[config_name])
config[config_name].init_app(app)

@app.route('/rest/prise4', methods=['GET'])
Expand Down
1 change: 1 addition & 0 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def init_app(app):

class DevConfig(Config):
DEBUG = False
IP_ROBOT = '192.168.3.98'

config = {
'devel' : DevConfig,
Expand Down

0 comments on commit b444e44

Please sign in to comment.