remove useless config in setting.py for 0.9.10

Bug #993731 reported by Deshi Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Won't Fix
Undecided
Unassigned

Bug Description

I have deploy graphite 0.9.10-pre1,
i found currently django setting is also can't work if only setting local_setting.py.
in django 1.4 environment, i should be modify setting.py
#Initialize database settings
DATABASES = {
    'default': {
        'NAME': os.path.join(STORAGE_DIR, 'graphite.db'),
        'ENGINE': 'django.db.backends.sqlite3',
    }
}

also we can remove useless code in above.
# Default sqlite db file
# This is set here so that a user-set STORAGE_DIR is available
if 'sqlite3' in DATABASE_ENGINE \
    and not DATABASE_NAME:
  DATABASE_NAME = join(STORAGE_DIR, 'graphite.db')

do you have any another option?

Deshi Xiao (xiaods)
tags: added: 0.9.10-pre1 django1.4
Revision history for this message
Michael Leinartas (mleinartas) wrote :

The local_settings.py.example file has a commented out example of the new config required for Django 1.4. We're still supporting Django 1.1 which doesn't read the new config style (it was introduced in Django 1.2) and additionally most of our users are still using the old-style database config style.

I looked for a solution that wouldn't break compatibility with older installs but still allow Django 1.4 to work with default settings, but the logic in settings.py became overly complex and ultimately it was deemed too risky. It was decided to err on the side of compatibility for this release. Next release, Django 1.1 support will be removed and we can default to the new style.

If you're working in settings.py, you should instead copy local_settings.py.example to local_settings.py and make your changes based on the comments there.

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Closing this based on comments above. Please reopen if necessary

Changed in graphite:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.