From: Radek Czajka Date: Thu, 20 Oct 2011 11:23:22 +0000 (+0200) Subject: use cas X-Git-Url: https://git.mdrn.pl/audio.git/commitdiff_plain/fe14ab3b5018c92b76e5880dd36b4eb02ef7a3ef?ds=inline;hp=339f6babf1e1d7b24e5b22662d04f99af909bd40 use cas --- diff --git a/apps/archive/locale/pl/LC_MESSAGES/django.mo b/apps/archive/locale/pl/LC_MESSAGES/django.mo index 638fe28..a851bda 100644 Binary files a/apps/archive/locale/pl/LC_MESSAGES/django.mo and b/apps/archive/locale/pl/LC_MESSAGES/django.mo differ diff --git a/apps/archive/locale/pl/LC_MESSAGES/django.po b/apps/archive/locale/pl/LC_MESSAGES/django.po index a4a6ca4..0216929 100644 --- a/apps/archive/locale/pl/LC_MESSAGES/django.po +++ b/apps/archive/locale/pl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-17 12:35+0200\n" -"PO-Revision-Date: 2011-05-17 12:37+0100\n" +"POT-Creation-Date: 2011-10-20 13:19+0200\n" +"PO-Revision-Date: 2011-10-20 13:22+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -17,96 +17,121 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#: models.py:15 -#: models.py:32 +#: constants.py:10 +msgid "Waiting" +msgstr "W kolejce" + +#: constants.py:11 +msgid "Encoding" +msgstr "Konwersja" + +#: constants.py:12 +msgid "Tagging" +msgstr "Opisywanie" + +#: constants.py:13 +msgid "Sending" +msgstr "Wysyłanie" + +#: models.py:21 +#: models.py:43 msgid "project" msgstr "projekt" -#: models.py:16 +#: models.py:22 msgid "projects" msgstr "projekty" -#: models.py:24 +#: models.py:35 msgid "source file" msgstr "plik źródłowy" -#: models.py:26 +#: models.py:38 msgid "title" msgstr "tytuł" -#: models.py:27 +#: models.py:39 msgid "artist" msgstr "lektor" -#: models.py:28 -msgid "arranger" -msgstr "aranżer" +#: models.py:40 +msgid "conductor" +msgstr "reżyser" -#: models.py:29 +#: models.py:41 msgid "encoded by" msgstr "przyg. techn." -#: models.py:30 +#: models.py:42 msgid "date" msgstr "data" -#: models.py:33 +#: models.py:44 msgid "book url" msgstr "URL książki" -#: models.py:46 +#: models.py:45 +msgid "translator" +msgstr "tłumacz" + +#: models.py:65 msgid "audiobook" msgstr "audiobook" -#: models.py:47 +#: models.py:66 msgid "audiobooks" msgstr "audiobooki" -#: templates/archive/base.html:7 +#: templates/base.html:7 msgid "Audiobook repository" msgstr "Repozytorium audiobooków" -#: templates/archive/base.html:12 +#: templates/archive/base.html:5 msgid "New" msgstr "Nowe" -#: templates/archive/base.html:13 +#: templates/archive/base.html:6 msgid "Unpublished" msgstr "Nie opublikowane" -#: templates/archive/base.html:14 +#: templates/archive/base.html:7 +#: templates/archive/file_managed.html:11 +msgid "Publishing" +msgstr "Publikacja" + +#: templates/archive/base.html:8 msgid "Published" msgstr "Opublikowane" -#: templates/archive/base.html:15 +#: templates/archive/base.html:9 msgid "Archive" msgstr "Archiwum" -#: templates/archive/file_managed.html:6 -msgid "Publishing" -msgstr "Publikacja" +#: templates/archive/base.html:10 +msgid "Logout" +msgstr "Wyloguj" -#: templates/archive/file_managed.html:9 -msgid "Audiobook marked for publishing with tags:" -msgstr "Audiobook zaznaczony do publikacji z tagami:" +#: templates/archive/base.html:11 +msgid "Projects" +msgstr "Projekty" -#: templates/archive/file_managed.html:18 -msgid "Publishing already in progress." -msgstr "Publikowanie rozpoczęte." +#: templates/archive/file_managed.html:15 +msgid "Publishing pending" +msgstr "Czeka na publikację" -#: templates/archive/file_managed.html:22 +#: templates/archive/file_managed.html:19 msgid "Cancel publishing" msgstr "Anuluj publikację" -#: templates/archive/file_managed.html:37 +#: templates/archive/file_managed.html:50 msgid "Publish" msgstr "Opublikuj" -#: templates/archive/file_managed.html:50 +#: templates/archive/file_managed.html:79 msgid "Update tags" msgstr "Uaktualnij tagi" -#: templates/archive/file_managed.html:69 +#: templates/archive/file_managed.html:91 #: templates/archive/file_new.html:19 msgid "Commit" msgstr "Zatwierdź" @@ -135,6 +160,10 @@ msgstr "Umieść nowe audiobooki w:" msgid "Published audiobooks" msgstr "Opublikowane audiobooki" +#: templates/archive/list_publishing.html:6 +msgid "Audiobooks being published" +msgstr "Aktualnie publikowane audiobooki" + #: templates/archive/list_unmanaged.html:5 msgid "Unmanaged archive" msgstr "Audiobooki archiwalne" @@ -143,3 +172,15 @@ msgstr "Audiobooki archiwalne" msgid "Unpublished audiobooks" msgstr "Nie opublikowane audiobooki" +#: templates/registration/login.html:9 +msgid "Login" +msgstr "Zaloguj" + +#~ msgid "arranger" +#~ msgstr "aranżer" + +#~ msgid "Audiobook marked for publishing with tags:" +#~ msgstr "Audiobook zaznaczony do publikacji z tagami:" + +#~ msgid "Publishing already in progress." +#~ msgstr "Publikowanie rozpoczęte." diff --git a/apps/archive/static/style.css b/apps/archive/static/style.css index 03d5947..434b87b 100755 --- a/apps/archive/static/style.css +++ b/apps/archive/static/style.css @@ -20,7 +20,7 @@ a { border-bottom: 1px solid #ff8000; } -#repo-zones-nav a { +#repo-zones-nav a, #repo-zones-nav span { display: block; float: left; padding: 5px 20px 5px 20px; diff --git a/apps/archive/templates/archive/base.html b/apps/archive/templates/archive/base.html index 42abde3..4a82e68 100644 --- a/apps/archive/templates/archive/base.html +++ b/apps/archive/templates/archive/base.html @@ -9,5 +9,6 @@ {% trans "Archive" %} {% trans "Logout" %} {% trans "Projects" %} + {{ user }}
{% endblock %} diff --git a/apps/archive/views.py b/apps/archive/views.py index cfed4a6..c3f4d8c 100644 --- a/apps/archive/views.py +++ b/apps/archive/views.py @@ -6,7 +6,7 @@ import os.path from archive import settings from django.contrib.auth import logout -from django.contrib.auth.decorators import login_required +from django.contrib.auth.decorators import login_required, permission_required from django.core.urlresolvers import reverse from django.db.models import Q, Max from django.http import Http404 @@ -31,7 +31,7 @@ def list_new(request): return render(request, "archive/list_new.html", locals()) -@login_required +@permission_required('archive.change_audiobook') def file_new(request, filename): division = 'new' @@ -70,7 +70,7 @@ def file_new(request, filename): @require_POST -@login_required +@permission_required('archive.change_audiobook') def move_to_archive(request, filename): """ move a new file to the unmanaged files dir """ @@ -96,7 +96,7 @@ def move_to_archive(request, filename): @require_POST -@login_required +@permission_required('archive.change_audiobook') def move_to_new(request, filename): """ move a unmanaged file to new files dir """ @@ -122,7 +122,7 @@ def move_to_new(request, filename): @require_POST -@login_required +@permission_required('archive.change_audiobook') def publish(request, aid): """ mark file for publishing """ audiobook = get_object_or_404(models.Audiobook, id=aid) @@ -144,7 +144,7 @@ def publish(request, aid): @require_POST -@login_required +@permission_required('archive.change_audiobook') def cancel_publishing(request, aid): """ cancel scheduled publishing """ audiobook = get_object_or_404(models.Audiobook, id=aid) @@ -189,7 +189,7 @@ def list_published(request): return render(request, "archive/list_published.html", locals()) -@login_required +@permission_required('archive.change_audiobook') def file_managed(request, id): audiobook = get_object_or_404(models.Audiobook, id=id) diff --git a/audiobooks/settings.py b/audiobooks/settings.py index 1df2c37..9289581 100644 --- a/audiobooks/settings.py +++ b/audiobooks/settings.py @@ -105,9 +105,15 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django_cas.middleware.CASMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) +AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'django_cas.backends.CASBackend', +) + ROOT_URLCONF = 'audiobooks.urls' TEMPLATE_DIRS = ( @@ -158,6 +164,10 @@ LOGGING = { } } +#http://logowanie.nowoczesnapolska.org.pl/cas/' +CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/" +CAS_VERSION = "1" + EMAIL_SUBJECT_PREFIX = '[Audio] ' SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl' diff --git a/requirements.txt b/requirements.txt index de03c23..034bd1a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ django>=1.3 django-jsonfield South>=0.7 +django-cas django-celery django-kombu