Ticket #1002 (closed defect: fixed)
Server and Django 1.2
Reported by: | https://www.google.com/accounts/o8/id?id=AItOawm53g_OvEixgi55cBdUXTHWrAwrQcK1PlU | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-reports | Version: | 1.0 |
Keywords: | Cc: |
Description
I've noticed that both the bcfg2 server and bcfg2-admin report DeprecationWarnings? when invoked on systems with versions of Django including and newer than Django 1.2:
For example, on my RHEL5 system with Django 1.3:
# bcfg2-admin reports validate /usr/lib/python2.4/site-packages/django/db/init__.py:19: DeprecationWarning?: settings.DATABASE_* is deprecated; use settings.DATABASES instead.
/usr/lib/python2.4/site-packages/django/db/init__.py:60: DeprecationWarning?: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
0 errors found
I see in bcfg2/src/lib/Server/Reports/settings.py that it uses DATABASE_ENGINE, DATABASE_NAME, etc., and that API has been deprecated, according to the Django docs:
http://docs.djangoproject.com/en/dev/releases/1.2/#specifying-databases "Prior to Django 1.2, Django used a number of settings to control access to a single database. Django 1.2 introduces support for multiple databases, and as a result the way you define database settings has changed.
Any existing Django settings file will continue to work as expected until Django 1.4. Until then, old-style database settings will be automatically translated to the new-style format."
Fixed in c16ed3a800cc6dd926c80bc75aaced5f3cf939d0