From: yomguy Date: Wed, 6 Apr 2011 00:32:09 +0000 (+0200) Subject: enable language detection and session set, adapt INSTALL, cleanup X-Git-Tag: 1.1~293 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a79c6521434250d213d1c17afdced8bd7d7e367c;p=telemeta.git enable language detection and session set, adapt INSTALL, cleanup --- diff --git a/INSTALL b/INSTALL index b6687189..88d22f68 100644 --- a/INSTALL +++ b/INSTALL @@ -127,24 +127,45 @@ Modifiy the following variables: 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 following languages: + + LANGUAGES = [ ('fr', 'French'), + ('en', 'English'), + ] + + +Set the following Middlewares: + MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.locale.LocaleMiddleware', + ) + Add the following variables: TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', 'django.contrib.auth.context_processors.auth',) - TELEMETA_ORGANIZATION = name of the organization which hosts this installation - TELEMETA_SUBJECTS = tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc... - TELEMETA_CACHE_DIR = absolute path to the cache directory that you just created - TELEMETA_GMAP_KEY = your Google Map API key - TELEMETA_DOWNLOAD_ENABLED = True to enable audio data download - TELEMETA_PUBLIC_ACCESS_PERIOD = 51 # (in years) - + TELEMETA_ORGANIZATION = name of the organization which hosts this installation + TELEMETA_SUBJECTS = tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc... + TELEMETA_CACHE_DIR = absolute path to the cache directory that you just created + TELEMETA_GMAP_KEY = your Google Map API key + TELEMETA_DOWNLOAD_ENABLED = True to enable audio data download + TELEMETA_PUBLIC_ACCESS_PERIOD = number of years above which item files are automagically published + EMAIL_HOST = your default SMTP server + DEFAULT_FROM_EMAIL = the default sending email address + Just paste the lines below:: LOGIN_URL = '/login' LOGIN_REDIRECT_URL = '/' + AUTH_PROFILE_MODULE = 'telemeta.userprofile' TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export" TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data" CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data" diff --git a/telemeta/locale/fr/LC_MESSAGES/django.mo b/telemeta/locale/fr/LC_MESSAGES/django.mo index 74d8d2f9..68192470 100644 Binary files a/telemeta/locale/fr/LC_MESSAGES/django.mo and b/telemeta/locale/fr/LC_MESSAGES/django.mo differ diff --git a/telemeta/locale/fr/LC_MESSAGES/django.po b/telemeta/locale/fr/LC_MESSAGES/django.po index 7a74e212..7e55d36c 100644 --- a/telemeta/locale/fr/LC_MESSAGES/django.po +++ b/telemeta/locale/fr/LC_MESSAGES/django.po @@ -888,6 +888,14 @@ msgstr "Statut super-utilisateur" msgid "Last login" msgstr "Dernière connexion" +#: templates/telemeta_default/profile_detail.html:60 +msgid "Set" +msgstr "Appliquer" + +#: templates/telemeta_default/profile_detail.html:50 +msgid "Language" +msgstr "Langue" + #: templates/telemeta_default/login.html:21 msgid "Password forgotten" msgstr "Mot de passe oublié" diff --git a/telemeta/templates/telemeta_default/admin.html b/telemeta/templates/telemeta_default/admin.html index 483b1b3f..10f9ae16 100644 --- a/telemeta/templates/telemeta_default/admin.html +++ b/telemeta/templates/telemeta_default/admin.html @@ -25,4 +25,5 @@ {% block tabcontents %} {% endblock %} + {% endblock %} diff --git a/telemeta/templates/telemeta_default/base.html b/telemeta/templates/telemeta_default/base.html index 0c008816..c42e1de0 100644 --- a/telemeta/templates/telemeta_default/base.html +++ b/telemeta/templates/telemeta_default/base.html @@ -60,7 +60,6 @@ + + {% if user.is_authenticated and user.username == usr.username or user.is_staff %} + {% trans "Edit" %} + {% endif %} + {% if user.is_authenticated and user.username == usr.username %} + {% trans "Change password" %} + {% endif %} + + {% endblock %} diff --git a/telemeta/urls.py b/telemeta/urls.py index 54c6bfa3..f4fb66c0 100644 --- a/telemeta/urls.py +++ b/telemeta/urls.py @@ -237,9 +237,11 @@ urlpatterns = patterns('', url(r'^accounts/password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'telemeta/registration/password_reset_complete.html'}, name="telemeta-password-reset-complete"), # JSON RPC - url(r'^json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), # for the graphical browser/web console only, omissible url(r'^json/$', jsonrpc_site.dispatch, name='jsonrpc_mountpoint'), - url(r'^json/(?P[a-zA-Z0-9.]+)$', jsonrpc_site.dispatch), # for HTTP GET only, also omissible + # for the graphical browser/web console only, omissible + url(r'^json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), + # for HTTP GET only, also omissible + #url(r'^json/(?P[a-zA-Z0-9.]+)$', jsonrpc_site.dispatch), # Playlists url(r'^playlists/(?P[a-zA-Z0-9]+)/(?P[a-zA-Z0-9]+)/csv/$', web_view.playlist_csv_export, name="telemeta-playlist-csv-export"), @@ -249,4 +251,5 @@ urlpatterns = patterns('', # Not allowed url(r'/*/(?P[A-Za-z0-9._-]+)/not_allowed/$', web_view.not_allowed, name="telemeta-not-allowed"), + )