From fe14ab3b5018c92b76e5880dd36b4eb02ef7a3ef Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 20 Oct 2011 13:23:22 +0200 Subject: [PATCH] use cas --- apps/archive/locale/pl/LC_MESSAGES/django.mo | Bin 2139 -> 2404 bytes apps/archive/locale/pl/LC_MESSAGES/django.po | 109 +++++++++++++------ apps/archive/static/style.css | 2 +- apps/archive/templates/archive/base.html | 1 + apps/archive/views.py | 14 +-- audiobooks/settings.py | 10 ++ requirements.txt | 1 + 7 files changed, 95 insertions(+), 42 deletions(-) diff --git a/apps/archive/locale/pl/LC_MESSAGES/django.mo b/apps/archive/locale/pl/LC_MESSAGES/django.mo index 638fe28bae8e39f3c0ffad01a0ce83bb1068cdd4..a851bda9c55d942c92821abdd590fd34484ab6d3 100644 GIT binary patch delta 1282 zcmYk*Ux-v?7{~EfXLkPRwyvAHy0+`t)m^tjaJHgck=QjsNK0s7!IU^Va~RLebk2DG zupJ4OteY-U;U!4uri(7R=_c?ZBQjdL@J_r71f#2vl+24j!S8Q8VK4K(pZ9&wd*0_c z?>Y0^@E;?qw?>Me8_F#8IqIo(#=L@GuBV~&3dWT2EN;OJ$M6Df#&58MSFwUW<8Hi; z19%s8{Q+*mhp77oi^kAhH4}7(n3zIsP(uZr$0{zO0w2Q-=;8==aR;uV)?d#33j2xS zM&_^LHvBao-$Jeb6HCN5f74N*e^CJnq^(4TQ1he6B{PY-K7-nzhFW(36=)IpnYU=P zu8!9@&G%62Cb>xozkm+Dfg{8>9v$8A0V?3f`GU`opZPZT3T|cmBkshTsKoA}j`jg6 z&;X708Nxx_j-xn@igO5cqDOI68=cNCWVxT90$s#m{2I0H3M$YIRDj=6@AghUzK;s< z2%o_Ui|Cqds6=<6=Jz1Enz<_HuLbi=D9~ZlhIQ2ZyT}QeX{v4_%017dSw+8_WS)t8R^5>OWo6-dD2Yg{Ry0*>PY`9yjn9w zoy{k<@0hJ&~kd|a@UW~ zcuhN87^@r!8ex-Z`+Q+~@L1UL14A38i9KF;wG@SIuaVe~3a{6CUZ8d6M4C8pm_`lH zai4DO2lM8gd_~=Du}#bVRah)9xqhPlYsHyrBMh2pgQV=~;>#P7$PMDItKp?$ePeC^ zzPbHQ?WOtJ0eiPN{&YMy_uc5gk#+Xd(#~opN!@PXdyZWwkM3Ov(r(&*@;n{4(f;MK zIq4=Vz85vuzBg}%!HO5fZP)%(n%Z>I?S`$iZI-gW_IBxL<%FKDlVoO(TbHspTRZO()x6#F<7`D;`$f54U2-~M*K0RC`%n4BO60Bmki}kPCn|@k N$=dn!eYbJWJO)}e#4`W@ delta 1056 zcmYk)OK1~87zgmFO`6m`Y-@bfwsy2t=)>9vwHSM7C?a?$LKQ?xWx83DZIYcZ*|apE zIe3x^B0~>7d(w*s(SxX1XhFSs@T7PUJt>F>!9x%J|7oE8*xBFgPV&t+v-7>}b4&Sa zTWC!nBw8n1jSvHLA8v?uFaqDhe)ti_;5KZ9t+hhb!5-KH`{4mN135kqafv)`%`kw> zcNf+RQ5LJ{FyR{951+tp_#C#wPmqaz!v*<1u}39D!af> z#zk=F7>zqrzI|7M4aYIvx4a4V58 zPTE^?MWUGW^n%tInNud?Cgm+{WWKnN^$KavPswF3NXtN_3TNYcerw#kE_i`9D`Hyt zj+@={7cs4KIWMpuYERki+H>|oXfmd<##PA`>G?8mbjrAe!jQca>adSPiKsG0`6<`f zKcUn1M0m{J49_+UkDnQtkRzk|C_VK8VhuV&!kWLd8F$1Gc+<@;^O9qVWI# 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 -- 2.20.1