Skip to content

Commit

Permalink
fix: replace FLASK_ENV with FLEXMEASURES_ENV in several places
Browse files Browse the repository at this point in the history
Signed-off-by: GustaafL <guus@seita.nl>
  • Loading branch information
GustaafL committed Dec 19, 2023
1 parent e34f3a4 commit e374873
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
environment:
SQLALCHEMY_DATABASE_URI: "postgresql://fm-dev-db-user:fm-dev-db-pass@dev-db:5432/fm-dev-db"
SECRET_KEY: notsecret
FLASK_ENV: development
FLEXMEASURES_ENV: development
LOGGING_LEVEL: INFO
volumes:
# a place for config and plugin code - the mount point is for running the FlexMeasures CLI, the 2nd for gunicorn
Expand All @@ -80,7 +80,7 @@ services:
FLEXMEASURES_REDIS_URL: queue-db
FLEXMEASURES_REDIS_PASSWORD: fm-redis-pass
SECRET_KEY: notsecret
FLASK_ENV: development
FLEXMEASURES_ENV: development
LOGGING_LEVEL: INFO
volumes:
# a place for config and plugin code
Expand Down
2 changes: 1 addition & 1 deletion documentation/tut/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Set an environment variable to indicate in which environment you are operating (

.. code-block:: bash
$ export FLASK_ENV=development
$ export FLEXMEASURES_ENV=development
(on Windows, use ``set`` instead of ``export``\ )

Expand Down
2 changes: 1 addition & 1 deletion documentation/tut/toy-example-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Install Flexmeasures and the database
$ pip install flexmeasures
$ export SQLALCHEMY_DATABASE_URI="postgresql://flexmeasures-user:fm-db-passwd@localhost:5432/flexmeasures-db" SECRET_KEY=notsecret LOGGING_LEVEL="INFO" DEBUG=0
$ export FLASK_ENV="development"
$ export FLEXMEASURES_ENV="development"
$ flexmeasures db upgrade
.. note:: When installing with ``pip``, on some platforms problems might come up (e.g. macOS, Windows). One reason is that FlexMeasures requires some libraries with lots of C code support (e.g. Numpy). One way out is to use Docker, which uses a prepared Linux image, so it'll definitely work.
Expand Down
2 changes: 1 addition & 1 deletion flexmeasures/ui/utils/view_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def render_flexmeasures_template(html_filename: str, **variables):
"""Render template and add all expected template variables, plus the ones given as **variables."""
variables["flask_env"] = current_app.env
variables["flexmeasures_env"] = current_app.env
variables["documentation_exists"] = False
if os.path.exists(
"%s/static/documentation/html/index.html" % flexmeasures_ui.root_path
Expand Down

0 comments on commit e374873

Please sign in to comment.