from db_settings import db DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '*****@*****.**'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'OPTIONS' : { 'read_default_file': site_path('my.cnf'), }, 'NAME': db.name, # Or path to database file if using sqlite3. 'USER': db.user, # Not used with sqlite3. 'PASSWORD': db.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. } } # 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. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from django.conf import settings from utils import site_path import jukebox.jsonfuncs import jukebox.configfuncs urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': site_path('jukebox/static'), 'show_indexes': True}), (r'^cache/(?P<path>.*)$', 'django.views.static.serve', {'document_root': site_path(settings.CACHE_FOLDER), 'show_indexes': True}), (r'^spider$', 'jukebox.views.spider'), (r'^config$', 'jukebox.views.config'), (r'^$', 'jukebox.views.index'), (r'^oldui$', 'jukebox.views.oldui'), url(r'^rpc/jukebox/browse$', 'jsonrpc.views.browse', name="jsonrpc_browser", kwargs={"site":jukebox.jsonfuncs.site}), url(r'^rpc/jukebox', jukebox.jsonfuncs.site.dispatch, name="jsonrpc_mountpoint"), url(r'^rpc/config', jukebox.configfuncs.site.dispatch, name="jsonrpc_mountpoint"), ) print "opened urls.py" print jukebox.jsonfuncs.site #One time startup #http://stackoverflow.com/questions/6791911/execute-code-when-django-starts-once-only from jukebox.models import ChatItem
# Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from django.conf import settings from utils import site_path import jukebox.jsonfuncs import jukebox.configfuncs urlpatterns = patterns( '', (r'^admin/', include(admin.site.urls)), (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': site_path('jukebox/static'), 'show_indexes': True }), (r'^cache/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': site_path(settings.CACHE_FOLDER), 'show_indexes': True }), (r'^spider$', 'jukebox.views.spider'), (r'^config$', 'jukebox.views.config'), (r'^$', 'jukebox.views.index'), (r'^oldui$', 'jukebox.views.oldui'), url(r'^rpc/jukebox/browse$', 'jsonrpc.views.browse', name="jsonrpc_browser", kwargs={"site": jukebox.jsonfuncs.site}), url(r'^rpc/jukebox',
TEMPLATE_DEBUG = DEBUG DEBUG_PROPAGATE_EXCEPTIONS = DEBUG TESTING = len(sys.argv) > 1 and sys.argv[1] == 'test' ADMINS = ( # ('Your Name', '*****@*****.**'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'OPTIONS' : { 'read_default_file': site_path('my.cnf'), }, 'NAME': db.name, # Or path to database file if using sqlite3. 'USER': db.user, # Not used with sqlite3. 'PASSWORD': db.password, # Not used with sqlite3. 'HOST': db.host, # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } import sys if 'test' in sys.argv or 'test_coverage' in sys.argv: #Covers regular testing and django-coverage DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3' DATABASES['default']['NAME'] = site_path('default.db') DATABASES['default']['TEST'] = {'NAME' : site_path('test.db')} DATABASES['default']['OPTIONS'] = {'timeout': 20}
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '*****@*****.**'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'OPTIONS': { 'read_default_file': site_path('my.cnf'), }, 'NAME': db.name, # Or path to database file if using sqlite3. 'USER': db.user, # Not used with sqlite3. 'PASSWORD': db.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. } } # 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. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system.