From: Guillaume Pellerin Date: Fri, 2 Jun 2023 08:01:26 +0000 (+0200) Subject: adapt to local postgres db & relative url X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=793cdf993eb4fb6c50ccdcd496807b1345084a18;p=telecaster-instance.git adapt to local postgres db & relative url --- diff --git a/collect.sh b/collect.sh old mode 100755 new mode 100644 index c779fa6..45dfa44 --- a/collect.sh +++ b/collect.sh @@ -1,4 +1,4 @@ #!/bin/sh -./manage.py collectstatic --ignore archives --ignore Pre-Barreau --ignore cache +./manage.py collectstatic --ignore archives --ignore Pre-Barreau --ignore cache --ignore edit --ignore trash diff --git a/settings.py b/settings.py index 47d02f6..eb551b8 100644 --- a/settings.py +++ b/settings.py @@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse_lazy sys.dont_write_bytecode = True -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( @@ -19,12 +19,12 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'teleforma', # Or path to database file if using sqlite3. 'USER': 'teleforma', # Not used with sqlite3. 'PASSWORD': 'Lashjium5', # 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. + 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '5432', # Set to empty string for default. Not used with sqlite3. } } @@ -116,7 +116,7 @@ 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. - '/usr/local/lib/telecaster/teleforma/teleforma/templates' + '/home/telecaster/apps/telecaster/instance/teleforma/templates' ) INSTALLED_APPS = ( @@ -140,7 +140,9 @@ INSTALLED_APPS = ( 'timezones', 'jqchat', # 'googletools', - 'telecaster', +# 'telecaster', + 'teleforma.sources', + ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -156,7 +158,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( TELEMETA_ORGANIZATION = 'Pre-Barreau' TELEMETA_SUBJECTS = ('barreau', 'crfpa', 'e-learning') -TELEMETA_DESCRIPTION = "Plateforme e-learning du CRFPA" +TELEMETA_DESCRIPTION = "Eddy" TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxRVbMrhnNNvToCbZQtWdaMbZTA_3RRGObu5PDoiBImgalVnnLU2yN4RMA' TELEMETA_CACHE_DIR = MEDIA_ROOT + 'cache' TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export" @@ -181,7 +183,7 @@ EMAIL_SUBJECT_PREFIX = '[' + TELEMETA_ORGANIZATION.decode('utf8') + '] ' POSTMAN_AUTO_MODERATE_AS = True -TELECASTER_MASTER_SERVER = 'teleforma.parisson.com' +TELECASTER_MASTER_SERVER = 'e-learning.crfpa.pre-barreau.com' TELECASTER_RSYNC_SERVER = 'telecaster@jimi.parisson.com:archives/' TELECASTER_RSYNC_LOG = '/var/log/telecaster/rsync.log' TELECASTER_CONF = [{'type':'mp3','server_type':'icecast', @@ -192,9 +194,9 @@ TELECASTER_CONF = [{'type':'mp3','server_type':'icecast', 'port':'8080'}, ] TELEFORMA_E_LEARNING_TYPE = 'CRFPA' -TELEFORMA_GLOBAL_TWEETER = False -TELEFORMA_PERIOD_TWEETER = True +TELEFORMA_GLOBAL_TWEETER = True +TELEFORMA_PERIOD_TWEETER = False ROUTER_IP = '81.57.221.26' - +os.environ['MPLCONFIGDIR'] = '/home/telecaster/.matplotlib' diff --git a/settings.pyc b/settings.pyc index 0eb2148..b2dda0c 100644 Binary files a/settings.pyc and b/settings.pyc differ diff --git a/update_schema.sh b/update_schema.sh old mode 100755 new mode 100644 diff --git a/urls.py b/urls.py index 8bacff0..7b1f79f 100644 --- a/urls.py +++ b/urls.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from django.conf.urls.defaults import * +#from django.conf.urls.defaults import * +from django.conf.urls import patterns, url, include # Uncomment the next two lines to enable the admin: from django.contrib import admin @@ -16,14 +17,15 @@ urlpatterns = patterns('', # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), - url(r'^admin/django/', include(admin.site.urls)), + url(r'^telecaster/admin/django/', include(admin.site.urls)), # TeleForma - (r'^', include('teleforma.urls')), - (r'^telecaster/', include('telecaster.urls')), + (r'^telecaster/', include('teleforma.urls')), + #(r'^telecaster/', include('telecaster.urls')), + (r'^telecaster/', include('teleforma.sources.urls')), # Languages - (r'^i18n/', include('django.conf.urls.i18n')), - (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), + (r'^telecaster/i18n/', include('django.conf.urls.i18n')), + (r'^telecaster/jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), ) diff --git a/wsgi.py b/wsgi.py index 3ff93f9..e7e7fe4 100644 --- a/wsgi.py +++ b/wsgi.py @@ -1,7 +1,7 @@ import os import sys -sys.path.append('/usr/local/lib/telecaster/instance') +sys.path.append('/home/telecaster/apps/telecaster/instance') #sys.path.append('/usr/local/lib/telecaster/instance/teleforma') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")