-
Notifications
You must be signed in to change notification settings - Fork 5
Confuguring PyCDB
Alexander Makeev edited this page Jun 24, 2013
·
5 revisions
To configure your PyCDB installation you have to do the following:
1. Go to conf/ folder of PyCDB
2. Copy some local_... file to a new one called local_[installation_name].py. The content will be something like this (comments on each section describe the sense):
import os
from utils import *
import common
# This will allow error notifications to the user (it will appear as error info web page)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# This sets up project path to properly store databases files (including meta-storage of SQLite and graph storage)
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))[:-5] # cut "/conf" from the end
# This is settings of meta-storage (it is used by applications to store, for example, appearance information)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': PROJECT_DIR + '/storage.sqlite', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # 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.
}
}
# This is a path to static folder (used only when server is launched in production as FCGI application)
STATIC_ROOT = PROJECT_DIR + '/static'
# Email settings to be used for forming emails
EMAIL_SITE_ROOT_URL = "http://localhost:8082"
EMAIL_FROM = "pce.dev@gmail.com"
# List of configurations that could be addressed by user of web user interface
CONFIGURATIONS = {
"facility" : ConfigurationInfo("Facility configuration", "graph_db.configurations.facility.Facility", PROJECT_DIR + "/graph_db/databases/facility.gpickle"),
}
# List of custom applications to be added
common.INSTALLED_APPS += [
# 'facility_tools'
]
# List of custom menu sources to be added
common.MENU_SOURCES += [
# "facility_tools.menu.MENU_ITEMS",
"std_editor.menu.MENU_ITEMS"
]