# HG changeset patch # User ymh # Date 1296220500 -3600 # Node ID 93d48df946cb46186b0c12867067df4c1e42ef77 # Parent 6a2a816d4ba32edaa3618a2da9a7f745b515b453 change platform to ldtplatform diff -r 6a2a816d4ba3 -r 93d48df946cb .hgignore --- a/.hgignore Fri Jan 28 12:43:49 2011 +0100 +++ b/.hgignore Fri Jan 28 14:15:00 2011 +0100 @@ -9,4 +9,11 @@ .*\.pyc$ syntax: regexp -^virtualenv/web/project-boot\.py$ \ No newline at end of file +^virtualenv/web/project-boot\.py$ +syntax: regexp +^web/platform/config\.py$ +^web/platform/\.htaccess$ +^web/\.htaccess$ + +syntax: regexp +^virtualenv/web/distribute-0\.6\.14\.tar\.gz$ \ No newline at end of file diff -r 6a2a816d4ba3 -r 93d48df946cb src/ldt/setup.py --- a/src/ldt/setup.py Fri Jan 28 12:43:49 2011 +0100 +++ b/src/ldt/setup.py Fri Jan 28 14:15:00 2011 +0100 @@ -6,21 +6,33 @@ version = __import__('ldt').__version__ +packages, data_files = [], [] + +for dirpath, dirnames, filenames in os.walk(django_dir): + # Ignore dirnames that start with '.' + for i, dirname in enumerate(dirnames): + if dirname.startswith('.'): del dirnames[i] + if '__init__.py' in filenames: + packages.append('.'.join(fullsplit(dirpath))) + elif filenames: + data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) + setup( name = 'Ldt', version = version, author = 'Yves-Marie Haussonne (IRI)', author_email = 'contact@iri.centrepompidou.fr', - packages = find_packages(), - package_data = { - '': [ - 'media/*', - 'locale/*/LC_MESSAGES/*', - 'templates/ldt/*.html', - 'templates/admin/*.html', - 'templates/cms/admin/cms/page/*.html', - ] - }, + packages = packages, + data_files = data_files, +# package_data = { +# '': [ +# 'media/*', +# 'locale/*/LC_MESSAGES/*', +# 'templates/ldt/*.html', +# 'templates/admin/*.html', +# 'templates/cms/admin/cms/page/*.html', +# ] +# }, scripts =[], url = 'https://www.iri.centrepompidou.fr/dev/hg/platform', license = 'LICENSE.txt', diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/.htaccess.mod_python.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/.htaccess.mod_python.tmpl Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,12 @@ +SetHandler python-program +PythonHandler ldt.core.handlers.modpython +SetEnv DJANGO_SETTINGS_MODULE ldtplatform.settings +SetEnv PY_USE_XMLPLUS true +PythonInterpreter platform +PythonOption django.root /~wakimd/platform/ldtplatform +PythonOption virtualenv.activate_path /iridata/users/wakimd/Env/Efculture/bin/activate_this.py +PythonDebug on +PythonPath "['/iridata/users/wakimd/Env/Efculture/lib/python2.6/sites-packages'] + sys.path" +Header set Pragma "no-cache" +Header set Cache-Control "no-cache" +Header set Expires "-1" diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/.htaccess.mod_wsgi.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/.htaccess.mod_wsgi.tmpl Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,20 @@ + +SetEnv DJANGO_SETTINGS_MODULE ldtplatform.settings +SetEnv PY_USE_XMLPLUS true +SetEnv PROJECT_PATH /iridata/users/wakimd/hg/platform/web +SetEnv PYTHON_PATH /iridata/users/wakimd/Env/Efculture/lib/python2.6/site-packages + +Options ExecCGI FollowSymLinks +SetHandler wsgi-script + +#if defined in global definition +#defined with WSGIDaemonProcess +#WSGIProcessGroup platform + +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ /dev/~wakimd/platform/ldtplatform/modwsgi.wsgi/$1 [QSA,PT,L] + +Header set Pragma "no-cache" +Header set Cache-Control "no-cache" +Header set Expires "-1" diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/__init__.py Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,17 @@ +VERSION = (0, 31, 0, "final", 0) + +VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2]))) + + +def get_version(): + version = '%s.%s' % (VERSION[0], VERSION[1]) + if VERSION[2]: + version = '%s.%s' % (version, VERSION[2]) + if VERSION[3:] == ('alpha', 0): + version = '%s pre-alpha' % version + else: + if VERSION[3] != 'final': + version = '%s %s %s' % (version, VERSION[3], VERSION[4]) + return version + +__version__ = get_version() diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/config.py.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/config.py.tmpl Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,73 @@ +import os, logging + +SITE_ID = 1 + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" +BASE_URL = '/~ymh/franceculture/' +WEB_URL = 'http://localhost/' +MEDIA_BASE_URL = BASE_URL + 'static/' +STREAM_URL = MEDIA_BASE_URL + "/content/" + +STREAM_SRC_PREFIX = "" + + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = os.path.abspath(BASE_DIR + "../static/") + + + +# 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 = MEDIA_BASE_URL + +CONTENT_ROOT = MEDIA_ROOT + "media/content/" + +STREAM_PATH = CONTENT_ROOT + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = MEDIA_URL + 'admin/' +LDT_MEDIA_PREFIX = MEDIA_URL + 'ldt/' + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'franceculture', # Or path to database file if using sqlite3. + 'USER': 'iri', # Not used with sqlite3. + 'PASSWORD': 'iri', # 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. + } +} + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt")) +LOG_LEVEL = logging.DEBUG + +INDEX_PATH = os.path.abspath(BASE_DIR + "../index/") + + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +EMAIL_USE_TLS = True +EMAIL_HOST = 'smtp.gmail.com' +EMAIL_HOST_USER = 'iri.ddc@gmail.com' +EMAIL_HOST_PASSWORD = 'ddciripompidou' +EMAIL_PORT = 587 + +ACCOUNT_ACTIVATION_DAYS = 7 +REGISTRATION_OPEN = False + +LDT_MAX_SEARCH_NUMBER = 50 +LDT_JSON_DEFAULT_INDENT = 2 + +EMPTY_MEDIA_EXTERNALID = None diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/locale/fr/LC_MESSAGES/django.mo Binary file web/ldtplatform/locale/fr/LC_MESSAGES/django.mo has changed diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/locale/fr/LC_MESSAGES/django.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/locale/fr/LC_MESSAGES/django.po Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,213 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-10-19 19:51+0200\n" +"PO-Revision-Date: 2010-02-17 02:57+0100\n" +"Last-Translator: Yves-Marie Haussonne \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: settings.py:39 +msgid "French" +msgstr "Français" + +#: templates/registration/login.html:14 +msgid "Log in" +msgstr "Connexion" + +#: templates/registration/login.html:17 +msgid "Sorry, that's not a valid username or password." +msgstr "Désolé, mais ce n'est pas un identifiant ou un mot de passe valide" + +#: templates/registration/login.html:25 +msgid "login" +msgstr "Connexion" + +#: templates/registration/login.html:29 +msgid "Forget password?" +msgstr "Mot de passe oublié ?" + +msgid "header_title" +msgstr "France Culture" + +msgid "page_title" +msgstr "France Culture" + +#~ msgid "You can not access this project" +#~ msgstr "Vous n'avez pas accès à ce projet" + +#~ msgid "home" +#~ msgstr "accueil" + +#~ msgid "contents" +#~ msgstr "Liste des contenus" + +#~ msgid "indexation projects" +#~ msgstr "Projets d'indexation" + +#~ msgid "accounts" +#~ msgstr "Liste des comptes" + +#~ msgid "Profiles" +#~ msgstr "Profile" + +#~ msgid "Log out" +#~ msgstr "déconnexion" + +#~ msgid "Langue" +#~ msgstr "Langue" + +#~ msgid "popup_player" +#~ msgstr "Code du lecteur" + +#~ msgid "popup_seo_body" +#~ msgstr "Code SEO" + +#~ msgid "popup_seo_meta" +#~ msgstr "Code balise meta header" + +#~ msgid "popup_links" +#~ msgstr "Liste de liens" + +#~ msgid "clik here to see the project content" +#~ msgstr "cliquer ici pour voir le contenu du projet" + +#~ msgid "content list" +#~ msgstr "Liste des contenus" + +#~ msgid "search" +#~ msgstr "Recherche" + +#~ msgid "project list" +#~ msgstr "Liste des projets" + +#~ msgid "name" +#~ msgstr "Nom" + +#~ msgid "create project" +#~ msgstr "Créer un projet" + +#~ msgid "preview media" +#~ msgstr "preview" + +#~ msgid "Create content" +#~ msgstr "Créer un Contenu" + +#~ msgid "open ldt" +#~ msgstr "Ouvrir sous Lignes de Temps" + +#~ msgid "copy project" +#~ msgstr "Copier projet" + +#~ msgid "link json by id" +#~ msgstr "Ouvrir le lecteur augmenté" + +#~ msgid "Project published, click to unpublish" +#~ msgstr "Projet publié, cliquer pour de-publier" + +#~ msgid "Project not published, click to publish" +#~ msgstr "Projet non publié, cliquer pour publier" + +#~ msgid "Create project" +#~ msgstr "Créer un projet" + +#~ msgid "" +#~ "The operation could not be performed because one or more error(s) " +#~ "occurred.
Please resubmit the content form after making the " +#~ "following changes:" +#~ msgstr "" +#~ "opération impossible à cause d'une ou plusieurs erreurs.
Veuillez " +#~ "resoumettre le formulaire contenu après avoir fait les changements " +#~ "suivants:" + +#~ msgid "" +#~ "The operation could not be performed because one or more error(s) " +#~ "occurred.
Please resubmit the media form after making the following " +#~ "changes:" +#~ msgstr "" +#~ "opération impossible à cause d'une ou plusieurs erreurs.
Veuillez " +#~ "resoumettre le formulaire media après avoir fait les changements suivants:" + +#~ msgid "media file is being processed please wait." +#~ msgstr "Le fichier média est en cours de traitement. Veullez patienter." + +#~ msgid "close_cancel" +#~ msgstr "Annuler" + +#~ msgid "delete" +#~ msgstr "Effacer" + +#~ msgid "write" +#~ msgstr "Enregistrer" + +#~ msgid "Update your project" +#~ msgstr "Mettre à jour un projet" + +#~ msgid "Create your project" +#~ msgstr "Créer un projet" + +#~ msgid "Title" +#~ msgstr "Titre" + +#~ msgid "List of contents" +#~ msgstr "Liste des Médias" + +#~ msgid "delete_project" +#~ msgstr "Effacer" + +#~ msgid "update_project" +#~ msgstr "Mettre à jour" + +#~ msgid "create_project" +#~ msgstr "Créer" + +#~ msgid "error" +#~ msgstr "Erreurs" + +#~ msgid "confirm" +#~ msgstr "Confirmer" + +#~ msgid "close_error" +#~ msgstr "fermer" + +#~ msgid "do_delete" +#~ msgstr "Effacer" + +#~ msgid "create account" +#~ msgstr "Créer un compte" + +#~ msgid "Pseudo" +#~ msgstr "Pseudo" + +#~ msgid "this field is compulsory" +#~ msgstr "Ce champs et obligatoire" + +#~ msgid "Password" +#~ msgstr "Mot de passe" + +#~ msgid "reset password" +#~ msgstr "Réinitialiser le mot de passe" + +#~ msgid "Connection" +#~ msgstr "Connexion" + +#~ msgid "Create" +#~ msgstr "Créer" + +#~ msgid "link json by externalid" +#~ msgstr "ouvrir le lecteur augmenté" + +#~ msgid "Space" +#~ msgstr "Esp. perso." + +#~ msgid "Create an account" +#~ msgstr "Créer un compte" diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/manage.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/manage.py Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,11 @@ +#!/usr/bin/env python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/modwsgi.wsgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/modwsgi.wsgi Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,25 @@ +import os, sys, site + +def application(environ, start_response): + os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE'] + + prev_sys_path = list(sys.path) + + sys.path.append(environ['PROJECT_PATH']) + for path in environ.get('PYTHON_PATH',"").split(os.pathsep): + if path: + site.addsitedir(path) + + new_sys_path = [] + for item in list(sys.path): + if item not in prev_sys_path: + new_sys_path.append(item) + sys.path.remove(item) + sys.path[:0] = new_sys_path + + import django.core.handlers.wsgi + + _application = django.core.handlers.wsgi.WSGIHandler() + + return _application(environ, start_response) + diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/settings.py Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,148 @@ +#@PydevCodeAnalysisIgnore +import os.path +# Django settings for project. + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': '', # 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. + } +} + +# 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. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'Europe/Paris' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'fr-fr' + +ugettext = lambda s: s + +LANGUAGES = ( + ('fr', ugettext('French')), +) + + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '' + +# 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 = '' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/media/' + +LDT_MEDIA_PREFIX = '/ldt/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.middleware.locale.LocaleMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'jogging.middleware.LoggingMiddleware', +) + +TEMPLATE_CONTEXT_PROCESSORS = ( + "django.core.context_processors.request", + "django.core.context_processors.auth", + "django.core.context_processors.debug", + "django.core.context_processors.i18n", + "django.core.context_processors.media", + "ldt.utils.context_processors.ldt", + "ldt.utils.context_processors.base", + "ldt.utils.context_processors.web", + "ldtplatform.utils.context_processors.version", +) + + +ROOT_URLCONF = 'platform.urls' + +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. + os.path.join(os.path.basename(__file__), 'templates'), +) + +INSTALLED_APPS = ( + 'jogging', + 'django_extensions', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.admin', + 'ldtplatform', + 'registration', + 'tagging', + 'ldt', + 'ldt.core', + 'ldt.ldt_utils', + 'ldt.user', + 'ldt.management', +) + +DECOUPAGE_BLACKLIST = ( + "de_PPP", +) + +ZIP_BLACKLIST = ( + "__MACOSX", +) + +ACCOUNT_ACTIVATION_DAYS = 7 + +LDT_MAX_SEARCH_NUMBER = 50 +LDT_JSON_DEFAULT_INDENT = 2 + + +from config import * + +LOGIN_URL = BASE_URL + 'ldtplatform/accounts/login/' +LOGOUT_URL = BASE_URL + 'ldtplatform/accounts/logout/' +LOGIN_REDIRECT_URL = BASE_URL + 'ldtplatform' + +GLOBAL_LOG_LEVEL = LOG_LEVEL +GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}] + diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/templates/ldt/ldt_utils/workspace.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/templates/ldt/ldt_utils/workspace.html Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,4 @@ +{% extends "ldt/ldt_utils/workspace_base.html" %} + +{% block title %}France Culture{% endblock %} +{% block base_title %}France Culture{% endblock %} diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/templates/registration/login.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/templates/registration/login.html Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,54 @@ +{% extends "registration/base.html" %} +{% load i18n %} +{% block js_declaration %}{{ block.super }} + +{% endblock %} + +{% block css_import %} + {{ block.super }} + + +{% endblock %} + + +{% block login %} +{% endblock %} + +{% block content_title %}{% trans 'Log in' %}{% endblock %} +{% block iricontent %} + {% if form.errors %} +

{% trans "Sorry, that's not a valid username or password." %}

+ {% endif %} +
+
+
+ {% csrf_token %} + + +
    + {{form.as_ul}} +
+
+ +
+
+ +
+
+
+
+ +{% endblock %} + + + diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/urls.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/urls.py Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,25 @@ +from django.conf.urls.defaults import patterns ,include, url +from django.contrib import admin + + +# Uncomment the next two lines to enable the admin: +admin.autodiscover() + +urlpatterns = patterns('', + # Example: + + # 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')), + + # Uncomment the next line to enable the admin: + (r'^admin/', include(admin.site.urls)), + (r'^i18n/', include('django.conf.urls.i18n')), + + (r'^ldt/', include('ldt.ldt_utils.urls')), + (r'^user/', include('ldt.user.urls')), + + (r'^accounts/', include('registration.backends.simple.urls')), + + (r'^/?$', 'django.views.generic.simple.redirect_to', {'url': 'ldt'}), +) diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/utils/__init__.py diff -r 6a2a816d4ba3 -r 93d48df946cb web/ldtplatform/utils/context_processors.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldtplatform/utils/context_processors.py Fri Jan 28 14:15:00 2011 +0100 @@ -0,0 +1,11 @@ +from django.conf import settings +import ldtplatform #@UnresolvedImport + +def version(request): + return {'VERSION': ldtplatform.VERSION_STR } + +def base(request): + return {'BASE_URL': settings.BASE_URL, 'MEDIA_URL': settings.MEDIA_URL } + +def web(request): + return {'WEB_URL': settings.WEB_URL } diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/.htaccess.mod_python.tmpl --- a/web/platform/.htaccess.mod_python.tmpl Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -SetHandler python-program -PythonHandler ldt.core.handlers.modpython -SetEnv DJANGO_SETTINGS_MODULE platform.settings -SetEnv PY_USE_XMLPLUS true -PythonInterpreter platform -PythonOption django.root /~wakimd/platform/platform -PythonOption virtualenv.activate_path /iridata/users/wakimd/Env/Efculture/bin/activate_this.py -PythonDebug on -PythonPath "['/iridata/users/wakimd/Env/Efculture/lib/python2.6/sites-packages'] + sys.path" -Header set Pragma "no-cache" -Header set Cache-Control "no-cache" -Header set Expires "-1" diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/.htaccess.mod_wsgi.tmpl --- a/web/platform/.htaccess.mod_wsgi.tmpl Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - -SetEnv DJANGO_SETTINGS_MODULE platform.settings -SetEnv PY_USE_XMLPLUS true -SetEnv PROJECT_PATH /iridata/users/wakimd/hg/platform/web -SetEnv PYTHON_PATH /iridata/users/wakimd/Env/Efculture/lib/python2.6/site-packages - -Options ExecCGI FollowSymLinks -SetHandler wsgi-script - -#if defined in global definition -#defined with WSGIDaemonProcess -#WSGIProcessGroup platform - -RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^(.*)$ /dev/~wakimd/platform/platform/modwsgi.wsgi/$1 [QSA,PT,L] - -Header set Pragma "no-cache" -Header set Cache-Control "no-cache" -Header set Expires "-1" diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/__init__.py --- a/web/platform/__init__.py Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -VERSION = (0, 31, 0, "final", 0) - -VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2]))) - - -def get_version(): - version = '%s.%s' % (VERSION[0], VERSION[1]) - if VERSION[2]: - version = '%s.%s' % (version, VERSION[2]) - if VERSION[3:] == ('alpha', 0): - version = '%s pre-alpha' % version - else: - if VERSION[3] != 'final': - version = '%s %s %s' % (version, VERSION[3], VERSION[4]) - return version - -__version__ = get_version() diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/config.py.tmpl --- a/web/platform/config.py.tmpl Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -import os, logging - -SITE_ID = 1 - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/" -BASE_URL = '/~ymh/franceculture/' -WEB_URL = 'http://localhost/' -MEDIA_BASE_URL = BASE_URL + 'static/' -STREAM_URL = MEDIA_BASE_URL + "/content/" - -STREAM_SRC_PREFIX = "" - - -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = os.path.abspath(BASE_DIR + "../static/") - - - -# 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 = MEDIA_BASE_URL - -CONTENT_ROOT = MEDIA_ROOT + "media/content/" - -STREAM_PATH = CONTENT_ROOT - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = MEDIA_URL + 'admin/' -LDT_MEDIA_PREFIX = MEDIA_URL + 'ldt/' - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'franceculture', # Or path to database file if using sqlite3. - 'USER': 'iri', # Not used with sqlite3. - 'PASSWORD': 'iri', # 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. - } -} - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../log/log.txt")) -LOG_LEVEL = logging.DEBUG - -INDEX_PATH = os.path.abspath(BASE_DIR + "../index/") - - -ADMINS = ( - # ('Your Name', 'your_email@domain.com'), -) - -MANAGERS = ADMINS - -EMAIL_USE_TLS = True -EMAIL_HOST = 'smtp.gmail.com' -EMAIL_HOST_USER = 'iri.ddc@gmail.com' -EMAIL_HOST_PASSWORD = 'ddciripompidou' -EMAIL_PORT = 587 - -ACCOUNT_ACTIVATION_DAYS = 7 -REGISTRATION_OPEN = False - -LDT_MAX_SEARCH_NUMBER = 50 -LDT_JSON_DEFAULT_INDENT = 2 - -EMPTY_MEDIA_EXTERNALID = None diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/locale/fr/LC_MESSAGES/django.mo Binary file web/platform/locale/fr/LC_MESSAGES/django.mo has changed diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/locale/fr/LC_MESSAGES/django.po --- a/web/platform/locale/fr/LC_MESSAGES/django.po Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-10-19 19:51+0200\n" -"PO-Revision-Date: 2010-02-17 02:57+0100\n" -"Last-Translator: Yves-Marie Haussonne \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: settings.py:39 -msgid "French" -msgstr "Français" - -#: templates/registration/login.html:14 -msgid "Log in" -msgstr "Connexion" - -#: templates/registration/login.html:17 -msgid "Sorry, that's not a valid username or password." -msgstr "Désolé, mais ce n'est pas un identifiant ou un mot de passe valide" - -#: templates/registration/login.html:25 -msgid "login" -msgstr "Connexion" - -#: templates/registration/login.html:29 -msgid "Forget password?" -msgstr "Mot de passe oublié ?" - -msgid "header_title" -msgstr "France Culture" - -msgid "page_title" -msgstr "France Culture" - -#~ msgid "You can not access this project" -#~ msgstr "Vous n'avez pas accès à ce projet" - -#~ msgid "home" -#~ msgstr "accueil" - -#~ msgid "contents" -#~ msgstr "Liste des contenus" - -#~ msgid "indexation projects" -#~ msgstr "Projets d'indexation" - -#~ msgid "accounts" -#~ msgstr "Liste des comptes" - -#~ msgid "Profiles" -#~ msgstr "Profile" - -#~ msgid "Log out" -#~ msgstr "déconnexion" - -#~ msgid "Langue" -#~ msgstr "Langue" - -#~ msgid "popup_player" -#~ msgstr "Code du lecteur" - -#~ msgid "popup_seo_body" -#~ msgstr "Code SEO" - -#~ msgid "popup_seo_meta" -#~ msgstr "Code balise meta header" - -#~ msgid "popup_links" -#~ msgstr "Liste de liens" - -#~ msgid "clik here to see the project content" -#~ msgstr "cliquer ici pour voir le contenu du projet" - -#~ msgid "content list" -#~ msgstr "Liste des contenus" - -#~ msgid "search" -#~ msgstr "Recherche" - -#~ msgid "project list" -#~ msgstr "Liste des projets" - -#~ msgid "name" -#~ msgstr "Nom" - -#~ msgid "create project" -#~ msgstr "Créer un projet" - -#~ msgid "preview media" -#~ msgstr "preview" - -#~ msgid "Create content" -#~ msgstr "Créer un Contenu" - -#~ msgid "open ldt" -#~ msgstr "Ouvrir sous Lignes de Temps" - -#~ msgid "copy project" -#~ msgstr "Copier projet" - -#~ msgid "link json by id" -#~ msgstr "Ouvrir le lecteur augmenté" - -#~ msgid "Project published, click to unpublish" -#~ msgstr "Projet publié, cliquer pour de-publier" - -#~ msgid "Project not published, click to publish" -#~ msgstr "Projet non publié, cliquer pour publier" - -#~ msgid "Create project" -#~ msgstr "Créer un projet" - -#~ msgid "" -#~ "The operation could not be performed because one or more error(s) " -#~ "occurred.
Please resubmit the content form after making the " -#~ "following changes:" -#~ msgstr "" -#~ "opération impossible à cause d'une ou plusieurs erreurs.
Veuillez " -#~ "resoumettre le formulaire contenu après avoir fait les changements " -#~ "suivants:" - -#~ msgid "" -#~ "The operation could not be performed because one or more error(s) " -#~ "occurred.
Please resubmit the media form after making the following " -#~ "changes:" -#~ msgstr "" -#~ "opération impossible à cause d'une ou plusieurs erreurs.
Veuillez " -#~ "resoumettre le formulaire media après avoir fait les changements suivants:" - -#~ msgid "media file is being processed please wait." -#~ msgstr "Le fichier média est en cours de traitement. Veullez patienter." - -#~ msgid "close_cancel" -#~ msgstr "Annuler" - -#~ msgid "delete" -#~ msgstr "Effacer" - -#~ msgid "write" -#~ msgstr "Enregistrer" - -#~ msgid "Update your project" -#~ msgstr "Mettre à jour un projet" - -#~ msgid "Create your project" -#~ msgstr "Créer un projet" - -#~ msgid "Title" -#~ msgstr "Titre" - -#~ msgid "List of contents" -#~ msgstr "Liste des Médias" - -#~ msgid "delete_project" -#~ msgstr "Effacer" - -#~ msgid "update_project" -#~ msgstr "Mettre à jour" - -#~ msgid "create_project" -#~ msgstr "Créer" - -#~ msgid "error" -#~ msgstr "Erreurs" - -#~ msgid "confirm" -#~ msgstr "Confirmer" - -#~ msgid "close_error" -#~ msgstr "fermer" - -#~ msgid "do_delete" -#~ msgstr "Effacer" - -#~ msgid "create account" -#~ msgstr "Créer un compte" - -#~ msgid "Pseudo" -#~ msgstr "Pseudo" - -#~ msgid "this field is compulsory" -#~ msgstr "Ce champs et obligatoire" - -#~ msgid "Password" -#~ msgstr "Mot de passe" - -#~ msgid "reset password" -#~ msgstr "Réinitialiser le mot de passe" - -#~ msgid "Connection" -#~ msgstr "Connexion" - -#~ msgid "Create" -#~ msgstr "Créer" - -#~ msgid "link json by externalid" -#~ msgstr "ouvrir le lecteur augmenté" - -#~ msgid "Space" -#~ msgstr "Esp. perso." - -#~ msgid "Create an account" -#~ msgstr "Créer un compte" diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/manage.py --- a/web/platform/manage.py Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/modwsgi.wsgi --- a/web/platform/modwsgi.wsgi Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -import os, sys, site - -def application(environ, start_response): - os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE'] - - prev_sys_path = list(sys.path) - - sys.path.append(environ['PROJECT_PATH']) - for path in environ.get('PYTHON_PATH',"").split(os.pathsep): - if path: - site.addsitedir(path) - - new_sys_path = [] - for item in list(sys.path): - if item not in prev_sys_path: - new_sys_path.append(item) - sys.path.remove(item) - sys.path[:0] = new_sys_path - - import django.core.handlers.wsgi - - _application = django.core.handlers.wsgi.WSGIHandler() - - return _application(environ, start_response) - diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/settings.py --- a/web/platform/settings.py Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -#@PydevCodeAnalysisIgnore -import os.path -# Django settings for project. - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - # ('Your Name', 'your_email@domain.com'), -) - -MANAGERS = ADMINS - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # 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. - } -} - -# 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. -# If running in a Windows environment this must be set to the same as your -# system time zone. -TIME_ZONE = 'Europe/Paris' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'fr-fr' - -ugettext = lambda s: s - -LANGUAGES = ( - ('fr', ugettext('French')), -) - - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' - -# 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 = '' - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' - -LDT_MEDIA_PREFIX = '/ldt/' - -# Make this unique, and don't share it with anybody. -SECRET_KEY = 't^lii5_z@tho$%6t&b#dm#t9nz$$ylyclxvkdiyqbl+(dnt(ma' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.middleware.locale.LocaleMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'jogging.middleware.LoggingMiddleware', -) - -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.core.context_processors.request", - "django.core.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "ldt.utils.context_processors.ldt", - "ldt.utils.context_processors.base", - "ldt.utils.context_processors.web", - "platform.utils.context_processors.version", -) - - -ROOT_URLCONF = 'platform.urls' - -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. - os.path.join(os.path.basename(__file__), 'templates'), -) - -INSTALLED_APPS = ( - 'jogging', - 'django_extensions', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.messages', - 'django.contrib.admin', - 'platform', - 'registration', - 'tagging', - 'ldt', - 'ldt.core', - 'ldt.ldt_utils', - 'ldt.user', - 'ldt.management', -) - -DECOUPAGE_BLACKLIST = ( - "de_PPP", -) - -ZIP_BLACKLIST = ( - "__MACOSX", -) - -ACCOUNT_ACTIVATION_DAYS = 7 - -LDT_MAX_SEARCH_NUMBER = 50 -LDT_JSON_DEFAULT_INDENT = 2 - - -from config import * - -LOGIN_URL = BASE_URL + 'platform/accounts/login/' -LOGOUT_URL = BASE_URL + 'platform' -LOGIN_REDIRECT_URL = BASE_URL + 'platform' - -GLOBAL_LOG_LEVEL = LOG_LEVEL -GLOBAL_LOG_HANDLERS = [{'handler':logging.FileHandler(LOG_FILE), 'format':"%(asctime)s - %(levelname)s : %(message)s"}] - diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/templates/ldt/ldt_utils/workspace.html --- a/web/platform/templates/ldt/ldt_utils/workspace.html Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -{% extends "ldt/ldt_utils/workspace_base.html" %} - -{% block title %}France Culture{% endblock %} -{% block base_title %}France Culture{% endblock %} diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/templates/registration/login.html --- a/web/platform/templates/registration/login.html Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -{% extends "registration/base.html" %} -{% load i18n %} -{% block js_declaration %}{{ block.super }} - -{% endblock %} - -{% block css_import %} - {{ block.super }} - - -{% endblock %} - - -{% block login %} -{% endblock %} - -{% block content_title %}{% trans 'Log in' %}{% endblock %} -{% block iricontent %} - {% if form.errors %} -

{% trans "Sorry, that's not a valid username or password." %}

- {% endif %} -
-
-
- {% csrf_token %} - - -
    - {{form.as_ul}} -
-
- -
-
- -
-
-
-
- -{% endblock %} - - - diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/urls.py --- a/web/platform/urls.py Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -from django.conf.urls.defaults import patterns ,include, url -from django.contrib import admin - - -# Uncomment the next two lines to enable the admin: -admin.autodiscover() - -urlpatterns = patterns('', - # Example: - - # 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')), - - # Uncomment the next line to enable the admin: - (r'^admin/', include(admin.site.urls)), - (r'^i18n/', include('django.conf.urls.i18n')), - - (r'^ldt/', include('ldt.ldt_utils.urls')), - (r'^user/', include('ldt.user.urls')), - - (r'^accounts/', include('registration.backends.simple.urls')), - - (r'^/?$', 'django.views.generic.simple.redirect_to', {'url': 'ldt'}), -) diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/utils/__init__.py diff -r 6a2a816d4ba3 -r 93d48df946cb web/platform/utils/context_processors.py --- a/web/platform/utils/context_processors.py Fri Jan 28 12:43:49 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -from django.conf import settings -import platform #@UnresolvedImport - -def version(request): - return {'VERSION': platform.VERSION_STR } - -def base(request): - return {'BASE_URL': settings.BASE_URL, 'MEDIA_URL': settings.MEDIA_URL } - -def web(request): - return {'WEB_URL': settings.WEB_URL }