Browse Source

fix #7

windows
Florian N 12 years ago
parent
commit
a723bbbc88
  1. 1
      .gitignore
  2. 3
      main/views.py
  3. 2
      pydash/settings.py

1
.gitignore

@ -1,4 +1,3 @@
*.pyc
._*
*.sqlite3
setting.py

3
main/views.py

@ -222,10 +222,9 @@ def get_cpu_usage():
usage_cpu = element[2]
total_usage.append(usage_cpu)
#del total_usage[0]
total_usage = sum(float(i) for i in total_usage)
total_free = (100 - float(total_usage))
total_free = ((100 * int(get_cpus()['cpus'])) - float(total_usage))
cpu_used = {'free': total_free, 'used': float(total_usage), 'all': usage}

2
pydash/settings.py

@ -18,7 +18,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '1)$crmowu-23tz@i2-d=7tb3t+1u&(pm!lnjyuarki^72h!3af'
SECRET_KEY = '1)$crmowu-23tz@i2-d=7tb3t+1u&(pm!lnjyuarki^72h!444'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

Loading…
Cancel
Save