14👍
graphite version 0.9.10 supports Django 1.4… however they put the sqlite settings in django’s local_settings.py
[mpenning@tsunami graphite]$ cat local_settings.py|grep -v \#
DATABASES = {
'default': {
'NAME': '/opt/graphite/storage/graphite.db',
'ENGINE': 'django.db.backends.sqlite3',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
}
[mpenning@tsunami graphite]$
[mpenning@tsunami graphite]$ pwd
/opt/graphite/webapp/graphite
[mpenning@tsunami graphite]$
9👍
You need to edit settings.py
and set the contents of the DATABASES
variable to something other than empty strings. There are comments next to it that tell you which database engines are supported:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
If you have nothing else installed, you could append sqlite3
to the ENGINE
string which is easy for development on your local machine.
- [Django]-How to loop over form field choices and display associated model instance fields
- [Django]-Django Background Task
- [Django]-Detect mobile, tablet or Desktop on Django
9👍
For users landing here with the error message “The SECRET_KEY setting must not be empty”, make sure to set the secret key in /opt/graphite/webapp/graphite/app_settings.py as well as in your django config.
- [Django]-How to add superuser in Django from fixture
- [Django]-Django: How to format a DateField's date representation?
- [Django]-Django storages: Import Error – no module named storages
1👍
I just add the DATABASES dictionary to the end of the file, it works.I hope the the graphite can run based on the Django 1.4.1
- [Django]-Do django db_index migrations run concurrently?
- [Django]-How to solve "Page not found (404)" error in Django?
- [Django]-Resource temporarily unavailable using uwsgi + nginx