Преглед на файлове

Change to Pritt print Cache

tags/3.1_alpha
Manuel83 преди 8 години
родител
ревизия
d9e79d0208
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. +1
    -1
      modules/core/core.py
  2. +2
    -1
      modules/system/__init__.py

+ 1
- 1
modules/core/core.py Целия файл

@@ -282,7 +282,7 @@ class CraftBeerPI(object):
self.cache["messages"] = []
self.cache["version"] = "3.1"
self.modules = {}
self.cache["users"] = {'manuel': {'pw': 'secret'}}
self.addon = Addon(self)
self.actor = ActorCore(self)
self.sensor = SensorCore(self)


+ 2
- 1
modules/system/__init__.py Целия файл

@@ -174,7 +174,8 @@ class SystemView(FlaskView):
200:
description: CraftBeerPi System Cache
"""
return json.dumps(cbpi.cache)
return Response(response=json.dumps(cbpi.cache, sort_keys=True, indent=4), status=200, mimetype='application/json')
@cbpi.addon.core.initializer()


Loading…
Отказ
Запис