1 |
commit: d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 16 16:20:21 2016 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 16 16:20:21 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=d3a4d698 |
7 |
|
8 |
update conf files |
9 |
|
10 |
python/gentoo_main/settings.py.conf | 37 +++++++++++++++++-------------------- |
11 |
python/gentoo_main/wsgi.py.conf | 2 +- |
12 |
python/tbc_www/router.py | 14 +++++++------- |
13 |
3 files changed, 25 insertions(+), 28 deletions(-) |
14 |
|
15 |
diff --git a/python/gentoo_main/settings.py.conf b/python/gentoo_main/settings.py.conf |
16 |
index 77f7621..f6847ce 100644 |
17 |
--- a/python/gentoo_main/settings.py.conf |
18 |
+++ b/python/gentoo_main/settings.py.conf |
19 |
@@ -1,36 +1,36 @@ |
20 |
import os |
21 |
ROOT_PATH = os.path.dirname(__file__) |
22 |
|
23 |
-# Django settings for tinderbox project. |
24 |
+# Django settings for tinderbox-cluster project. |
25 |
|
26 |
DEBUG = True |
27 |
TEMPLATE_DEBUG = DEBUG |
28 |
|
29 |
ADMINS = ( |
30 |
- # ('Magnus Granberg', 'zorry@×××.nu'), |
31 |
+ # ('Magnus Granberg', 'zorry@g.o'), |
32 |
) |
33 |
|
34 |
MANAGERS = ADMINS |
35 |
|
36 |
DATABASES = { |
37 |
'default': { |
38 |
- 'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
39 |
- 'NAME': 'www_zobcs', # Or path to database file if using sqlite3. |
40 |
- 'USER': 'www_zobcs', # Not used with sqlite3. |
41 |
+ 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
42 |
+ 'NAME': 'gentoo-www', # Or path to database file if using sqlite3. |
43 |
+ 'USER': 'tbc_www', # Not used with sqlite3. |
44 |
'PASSWORD': 'fooo', # Not used with sqlite3. |
45 |
- 'HOST': '192.168.0.5', # Set to empty string for localhost. Not used with sqlite3. |
46 |
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
47 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
48 |
}, |
49 |
'zobcs': { |
50 |
- 'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
51 |
- 'NAME': 'zobcs', # Or path to database file if using sqlite3. |
52 |
- 'USER': 'zobcs', # Not used with sqlite3. |
53 |
+ 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
54 |
+ 'NAME': 'tbc', # Or path to database file if using sqlite3. |
55 |
+ 'USER': 'tbc', # Not used with sqlite3. |
56 |
'PASSWORD': 'fooooo.', # Not used with sqlite3. |
57 |
- 'HOST': '192.168.0.5', # Set to empty string for localhost. Not used with sqlite3. |
58 |
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
59 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
60 |
} |
61 |
} |
62 |
-DATABASE_ROUTERS = ['zobcs.router.ZobcsRouter'] |
63 |
+DATABASE_ROUTERS = ['tbc_www.router.TBCRouter'] |
64 |
# Local time zone for this installation. Choices can be found here: |
65 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
66 |
# although not all choices may be available on all operating systems. |
67 |
@@ -71,7 +71,7 @@ STATIC_ROOT = os.path.join(ROOT_PATH, '../../static/') |
68 |
|
69 |
# URL prefix for static files. |
70 |
# Example: "http://media.lawrence.com/static/" |
71 |
-STATIC_URL = 'http://127.0.0.1/static/' |
72 |
+STATIC_URL = '/static/' |
73 |
|
74 |
# Additional locations of static files |
75 |
STATICFILES_DIRS = ( |
76 |
@@ -106,16 +106,16 @@ MIDDLEWARE_CLASSES = ( |
77 |
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
78 |
) |
79 |
|
80 |
-ROOT_URLCONF = 'tinderbox.urls' |
81 |
+ROOT_URLCONF = 'tbc_www.urls' |
82 |
|
83 |
# Python dotted path to the WSGI application used by Django's runserver. |
84 |
-WSGI_APPLICATION = 'tinderbox.wsgi.application' |
85 |
+WSGI_APPLICATION = 'gentoo_main.wsgi.application' |
86 |
|
87 |
TEMPLATE_DIRS = ( |
88 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
89 |
# Always use forward slashes, even on Windows. |
90 |
# Don't forget to use absolute paths, not relative paths. |
91 |
- os.path.join(ROOT_PATH, '../zobcs/templates/'), |
92 |
+ os.path.join(ROOT_PATH, '../templates/'), |
93 |
) |
94 |
|
95 |
INSTALLED_APPS = ( |
96 |
@@ -129,7 +129,8 @@ INSTALLED_APPS = ( |
97 |
# 'django.contrib.admin', |
98 |
# Uncomment the next line to enable admin documentation: |
99 |
# 'django.contrib.admindocs', |
100 |
- 'zobcs', |
101 |
+ 'tbc_www', |
102 |
+ 'gentoo_www', |
103 |
) |
104 |
|
105 |
# A sample logging configuration. The only tangible logging |
106 |
@@ -160,7 +161,3 @@ LOGGING = { |
107 |
}, |
108 |
} |
109 |
} |
110 |
-LOGIN_REDIRECT_URL='/' |
111 |
-BUGZILLA_USER='fooooo@××××.org' |
112 |
-BUGZILLA_PASS='password' |
113 |
-BUGZILLA_URL='https://bugs.gentoo.org/xmlrpc.cgi' |
114 |
|
115 |
diff --git a/python/gentoo_main/wsgi.py.conf b/python/gentoo_main/wsgi.py.conf |
116 |
index 8a289b8..f3b7191 100644 |
117 |
--- a/python/gentoo_main/wsgi.py.conf |
118 |
+++ b/python/gentoo_main/wsgi.py.conf |
119 |
@@ -16,7 +16,7 @@ framework. |
120 |
import os |
121 |
import sys |
122 |
sys.path.append('/home/zorry/zobsc/frontend/python') |
123 |
-os.environ['DJANGO_SETTINGS_MODULE'] = 'tinderbox.settings' |
124 |
+os.environ['DJANGO_SETTINGS_MODULE'] = 'gentoo_main.settings' |
125 |
|
126 |
# This application object is used by any WSGI server configured to use this |
127 |
# file. This includes Django's development server, if the WSGI_APPLICATION |
128 |
|
129 |
diff --git a/python/tbc_www/router.py b/python/tbc_www/router.py |
130 |
index aa16759..7a512fd 100644 |
131 |
--- a/python/tbc_www/router.py |
132 |
+++ b/python/tbc_www/router.py |
133 |
@@ -3,28 +3,28 @@ |
134 |
|
135 |
class TBCRouter(object): |
136 |
def db_for_read(self, model, **hints): |
137 |
- "Point all operations on zobcs models to 'zobcs'" |
138 |
+ "Point all operations on tbc models to 'tbc'" |
139 |
if model._meta.app_label == 'tbc_www': |
140 |
- return 'zobcs' |
141 |
+ return 'tbc' |
142 |
return 'default' |
143 |
|
144 |
def db_for_write(self, model, **hints): |
145 |
- "Point all operations on zobcs models to 'zobcs'" |
146 |
+ "Point all operations on tbc models to 'tbc'" |
147 |
if model._meta.app_label == 'tbc_www': |
148 |
- return 'zobcs' |
149 |
+ return 'tbc' |
150 |
return 'default' |
151 |
|
152 |
def allow_relation(self, obj1, obj2, **hints): |
153 |
- "Allow any relation if a both models in zobcs app" |
154 |
+ "Allow any relation if a both models in tbc app" |
155 |
if obj1._meta.app_label == 'tbc_www' and obj2._meta.app_label == 'tbc_www': |
156 |
return True |
157 |
- # Allow if neither is zobcs app |
158 |
+ # Allow if neither is tbc app |
159 |
elif 'tbc_www' not in [obj1._meta.app_label, obj2._meta.app_label]: |
160 |
return True |
161 |
return False |
162 |
|
163 |
def allow_migrate(self, db, model): |
164 |
- if db == 'zobcs' or model._meta.app_label == "tbc_www": |
165 |
+ if db == 'tbc' or model._meta.app_label == "tbc_www": |
166 |
return False # we're not using syncdb on our legacy database |
167 |
else: # but all other models/databases are fine |
168 |
return True |