Skip to content
Snippets Groups Projects
Commit 7f222e0a authored by Brian Moe's avatar Brian Moe
Browse files

Updated database spec. workaround for import repetition of mysql libs.

parent 423b27ad
No related branches found
No related tags found
No related merge requests found
# Django settings for gracedb project. # Django settings for gracedb project.
import os import os
try:
# Workaround for a bug
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473584
# http://bugs.python.org/setuptools/issue36
# import MySQLdb followed by import pkg_resources complains
# /usr/lib/python2.6/dist-packages/pytz/__init__.py:32: UserWarning: Module _mysql was already imported from /usr/lib/pymodules/python2.6/_mysql.so, but /usr/lib/pymodules/python2.6 is being added to sys.path
import pkg_resources
except:
pass
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
...@@ -40,13 +50,14 @@ XMPP_ALERT_CHANNELS = [ ...@@ -40,13 +50,14 @@ XMPP_ALERT_CHANNELS = [
'test_grb', 'test_grb',
] ]
DATABASE_ENGINE = 'mysql' DATABASES = {
DATABASE_NAME = 'gracedb' 'default' : {
DATABASE_USER = 'gracedb' 'NAME' : 'gracedb',
DATABASE_PASSWORD = 'redrum4x' 'ENGINE' : 'django.db.backends.mysql',
DATABASE_HOST = '' # Set to empty string for localhost. 'USER' : 'gracedb',
DATABASE_PORT = '' # Set to empty string for default. 'PASSWORD' : 'redrum4x',
}
}
# SkyAlert # SkyAlert
......
# Django settings for gracedb project. # Django settings for gracedb project.
try:
# Workaround for a bug
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473584
# http://bugs.python.org/setuptools/issue36
# import MySQLdb followed by import pkg_resources complains
# /usr/lib/python2.6/dist-packages/pytz/__init__.py:32: UserWarning: Module _mysql was already imported from /usr/lib/pymodules/python2.6/_mysql.so, but /usr/lib/pymodules/python2.6 is being added to sys.path
import pkg_resources
except:
pass
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
...@@ -27,14 +38,15 @@ XMPP_ALERT_CHANNELS = [ ...@@ -27,14 +38,15 @@ XMPP_ALERT_CHANNELS = [
'test_cwb', 'test_cwb',
'test_lowmass', 'test_lowmass',
] ]
DATABASE_ENGINE = 'mysql' DATABASES = {
DATABASE_NAME = 'gracedb' 'default' : {
DATABASE_USER = 'gracedb' 'NAME' : 'gracedb',
DATABASE_PASSWORD = 'redrum4x' 'ENGINE' : 'django.db.backends.mysql',
DATABASE_HOST = '' # Set to empty string for localhost. 'USER' : 'gracedb',
DATABASE_PORT = '' # Set to empty string for default. 'PASSWORD' : 'redrum4x',
}
}
# SkyAlert # SkyAlert
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment