diff options
author | 2016-02-16 17:20:21 +0100 | |
---|---|---|
committer | 2016-02-16 17:20:21 +0100 | |
commit | d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a (patch) | |
tree | c4639ac2a6bf4ef24b2c374011e67307a7377c36 | |
parent | add full db of the web (diff) | |
download | tinderbox-cluster-www-d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a.tar.gz tinderbox-cluster-www-d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a.tar.bz2 tinderbox-cluster-www-d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a.zip |
update conf files
-rw-r--r-- | python/gentoo_main/settings.py.conf | 37 | ||||
-rw-r--r-- | python/gentoo_main/wsgi.py.conf | 2 | ||||
-rw-r--r-- | python/tbc_www/router.py | 14 |
3 files changed, 25 insertions, 28 deletions
diff --git a/python/gentoo_main/settings.py.conf b/python/gentoo_main/settings.py.conf index 77f7621..f6847ce 100644 --- a/python/gentoo_main/settings.py.conf +++ b/python/gentoo_main/settings.py.conf @@ -1,36 +1,36 @@ import os ROOT_PATH = os.path.dirname(__file__) -# Django settings for tinderbox project. +# Django settings for tinderbox-cluster project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( - # ('Magnus Granberg', 'zorry@ume.nu'), + # ('Magnus Granberg', 'zorry@gentoo.org'), ) MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'www_zobcs', # Or path to database file if using sqlite3. - 'USER': 'www_zobcs', # Not used with sqlite3. + 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'gentoo-www', # Or path to database file if using sqlite3. + 'USER': 'tbc_www', # Not used with sqlite3. 'PASSWORD': 'fooo', # Not used with sqlite3. - 'HOST': '192.168.0.5', # Set to empty string for localhost. 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. }, 'zobcs': { - 'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'zobcs', # Or path to database file if using sqlite3. - 'USER': 'zobcs', # Not used with sqlite3. + 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'tbc', # Or path to database file if using sqlite3. + 'USER': 'tbc', # Not used with sqlite3. 'PASSWORD': 'fooooo.', # Not used with sqlite3. - 'HOST': '192.168.0.5', # Set to empty string for localhost. 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. } } -DATABASE_ROUTERS = ['zobcs.router.ZobcsRouter'] +DATABASE_ROUTERS = ['tbc_www.router.TBCRouter'] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. @@ -71,7 +71,7 @@ STATIC_ROOT = os.path.join(ROOT_PATH, '../../static/') # URL prefix for static files. # Example: "http://media.lawrence.com/static/" -STATIC_URL = 'http://127.0.0.1/static/' +STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( @@ -106,16 +106,16 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) -ROOT_URLCONF = 'tinderbox.urls' +ROOT_URLCONF = 'tbc_www.urls' # Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'tinderbox.wsgi.application' +WSGI_APPLICATION = 'gentoo_main.wsgi.application' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - os.path.join(ROOT_PATH, '../zobcs/templates/'), + os.path.join(ROOT_PATH, '../templates/'), ) INSTALLED_APPS = ( @@ -129,7 +129,8 @@ INSTALLED_APPS = ( # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', - 'zobcs', + 'tbc_www', + 'gentoo_www', ) # A sample logging configuration. The only tangible logging @@ -160,7 +161,3 @@ LOGGING = { }, } } -LOGIN_REDIRECT_URL='/' -BUGZILLA_USER='fooooo@gooo.org' -BUGZILLA_PASS='password' -BUGZILLA_URL='https://bugs.gentoo.org/xmlrpc.cgi' diff --git a/python/gentoo_main/wsgi.py.conf b/python/gentoo_main/wsgi.py.conf index 8a289b8..f3b7191 100644 --- a/python/gentoo_main/wsgi.py.conf +++ b/python/gentoo_main/wsgi.py.conf @@ -16,7 +16,7 @@ framework. import os import sys sys.path.append('/home/zorry/zobsc/frontend/python') -os.environ['DJANGO_SETTINGS_MODULE'] = 'tinderbox.settings' +os.environ['DJANGO_SETTINGS_MODULE'] = 'gentoo_main.settings' # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION diff --git a/python/tbc_www/router.py b/python/tbc_www/router.py index aa16759..7a512fd 100644 --- a/python/tbc_www/router.py +++ b/python/tbc_www/router.py @@ -3,28 +3,28 @@ class TBCRouter(object): def db_for_read(self, model, **hints): - "Point all operations on zobcs models to 'zobcs'" + "Point all operations on tbc models to 'tbc'" if model._meta.app_label == 'tbc_www': - return 'zobcs' + return 'tbc' return 'default' def db_for_write(self, model, **hints): - "Point all operations on zobcs models to 'zobcs'" + "Point all operations on tbc models to 'tbc'" if model._meta.app_label == 'tbc_www': - return 'zobcs' + return 'tbc' return 'default' def allow_relation(self, obj1, obj2, **hints): - "Allow any relation if a both models in zobcs app" + "Allow any relation if a both models in tbc app" if obj1._meta.app_label == 'tbc_www' and obj2._meta.app_label == 'tbc_www': return True - # Allow if neither is zobcs app + # Allow if neither is tbc app elif 'tbc_www' not in [obj1._meta.app_label, obj2._meta.app_label]: return True return False def allow_migrate(self, db, model): - if db == 'zobcs' or model._meta.app_label == "tbc_www": + if db == 'tbc' or model._meta.app_label == "tbc_www": return False # we're not using syncdb on our legacy database else: # but all other models/databases are fine return True |