From 571bd794df8c077d770fbed333411b0094c79a31 Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 16 Jun 2011 11:14:39 +0200 Subject: [PATCH] fix more urls, add install infos --- INSTALL.rst | 32 +++++++++++++++++-- conf/examples/django/settings.py | 30 ++++++++--------- conf/examples/django/urls.py | 3 +- .../telemeta_default/admin_general.html | 2 +- 4 files changed, 46 insertions(+), 21 deletions(-) diff --git a/INSTALL.rst b/INSTALL.rst index bb28cbfc..80e56ff9 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -78,7 +78,7 @@ Install Telemeta Uncompress the archive like:: - tar xzvf telemeta_0.5.1.tar.gz + tar xzvf telemeta_0.9.6.tar.gz Go to the main folder of telemeta and run this command in a shell as root:: @@ -119,7 +119,19 @@ Modifiy the following variables: ADMINS = telemeta requires that you indicate an administrator here DATABASES = your database setting dict (don't forget to create the database if needed) MEDIA_ROOT = absolute path to the media directory you just created - INSTALLED_APPS = add 'telemeta' and 'jsonrpc' to the tuple + +Set the app lists as follow:: + + INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.admin', + 'telemeta', + 'jsonrpc', + ) Set the following languages: @@ -166,7 +178,14 @@ Just paste the lines below:: TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export" TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data" CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data" + +If you want some personal templates, for example:: + TEMPLATE_DIRS = ( + '/home/dev/telemeta/sandboxes/sandbox_generic/templates/', + ) + + You can find an example for settings.py there:: conf/examples/django/settings.py @@ -199,6 +218,15 @@ The simplest case is to have telemeta running at public root. To do so, add this # Languages (r'^i18n/', include('django.conf.urls.i18n')), (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), + +You should also bring the django admin:: + + (r'^admin/django/', include(admin.site.urls)), + +Please also uncomment:: + + from django.contrib import admin + admin.autodiscover() You can find an example for url.py there:: diff --git a/conf/examples/django/settings.py b/conf/examples/django/settings.py index 8892a646..56fc003a 100644 --- a/conf/examples/django/settings.py +++ b/conf/examples/django/settings.py @@ -14,9 +14,9 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. # 'OPTIONS': { 'init_command': 'SET storage_engine=INNODB', }, - 'NAME': 'crem_gamma', # Or path to database file if using sqlite3. - 'USER': 'root', # Not used with sqlite3. - 'PASSWORD': 'washncellarm', # Not used with sqlite3. + 'NAME': 'telemeta', # 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. } @@ -29,7 +29,7 @@ DATABASES = { # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. -TIME_ZONE = 'France/Paris' +TIME_ZONE = 'Europe/Paris' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html @@ -55,7 +55,7 @@ MEDIA_ROOT = '/home/dev/telemeta/sandboxes/sandbox_generic/media/' # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = 'http://telemetagen.parisson.com/media/' +MEDIA_URL = '' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. @@ -63,7 +63,7 @@ MEDIA_URL = 'http://telemetagen.parisson.com/media/' ADMIN_MEDIA_PREFIX = 'http://wm22.parisson.com/django/media/' # Make this unique, and don't share it with anybody. -SECRET_KEY = 'a8l7%06wr2k+3=%#*#@#rvop2mmzko)44%7k(zx%lls^ihm9^5' +SECRET_KEY = '***************************************' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( @@ -72,7 +72,6 @@ TEMPLATE_LOADERS = ( # 'django.template.loaders.eggs.Loader', ) -#from pybb.settings import * MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', @@ -81,7 +80,6 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', -# 'pybb.middleware.PybbMiddleware', ) ROOT_URLCONF = 'sandbox_generic.urls' @@ -102,7 +100,6 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'telemeta', 'jsonrpc', -# 'pybb', ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -110,20 +107,21 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', ) -LOCALE_PATHS = ( - '/home/dev/telemeta/telemeta/telemeta/locale', -) - +#LOCALE_PATHS = ( + #'/home/dev/telemeta/telemeta/telemeta/locale', +#) -TELEMETA_ORGANIZATION = 'Parisson' -TELEMETA_SUBJECTS = ('telemeta', 'tests') -#TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxTTmRMP7-eYZsBYJ-PvZl_yIepBeRTkyT5vhsplIufBBcU2b3jjLSsn2A' +TELEMETA_ORGANIZATION = 'CREM' +TELEMETA_SUBJECTS = ('Ethnomusicology', 'Research') TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxRVbMrhnNNvToCbZQtWdaMbZTA_3RRGObu5PDoiBImgalVnnLU2yN4RMA' TELEMETA_DOWNLOAD_ENABLED = True TELEMETA_STREAMING_FORMATS = ('mp3', 'ogg') TELEMETA_PUBLIC_ACCESS_PERIOD = 51 AUTH_PROFILE_MODULE = 'telemeta.userprofile' +TELEMETA_OAI_HOST = 'telemeta.wm22.parisson.org' +TELEMETA_OAI_REPOSITORY_NAME = "University of Paris 10. CNRS. Research Centre of Ethnomusicology (CREM). Sound archives" + LOGIN_URL = '/login' LOGIN_REDIRECT_URL = '/' EMAIL_HOST = 'smtp.free.fr' diff --git a/conf/examples/django/urls.py b/conf/examples/django/urls.py index 9950059d..6dd41922 100644 --- a/conf/examples/django/urls.py +++ b/conf/examples/django/urls.py @@ -18,7 +18,7 @@ urlpatterns = patterns('', # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - (r'^djangoadmin/', include(admin.site.urls)), + (r'^admin/django/', include(admin.site.urls)), # Telemeta (r'^', include('telemeta.urls')), @@ -26,5 +26,4 @@ urlpatterns = patterns('', # Languages (r'^i18n/', include('django.conf.urls.i18n')), (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), -# (r'^forum/', include('pybb.urls')), ) diff --git a/telemeta/templates/telemeta_default/admin_general.html b/telemeta/templates/telemeta_default/admin_general.html index 43f53b1e..ec562324 100644 --- a/telemeta/templates/telemeta_default/admin_general.html +++ b/telemeta/templates/telemeta_default/admin_general.html @@ -2,5 +2,5 @@ {% load i18n %} {% block tabcontents %} -