--- /dev/null
+Platforma Redakcyjna
+====================
+
+Opis projektu
+*************
+Platforma to serwis służący do grupowej edycji książek na potrzeby serwisu WolneLektury.pl.
+
+Wymagania
+*********
+* `Django 1.1 <http://djangoproject.com/>`_
+* `django-piston 0.2.3rc1 <http://bitbucket.org/jespern/django-piston/>`_
+* `librarian 1.2 <http://redmine.nowoczesnapolska.org.pl/projects/show/librarian>`_
+* `lxml 2.2.2 <http://codespeak.net/lxml/>`_
+* `Mercurial 1.3.1 <http://www.selenic.com/mercurial/>`_
+* `PIL 1.1.6 <http://www.pythonware.com/products/pil/>`_ (wymagane przez skrypt imgconv.py)
+* `pngnq <http://pngnq.sourceforge.net/>`_ (wymagane przez skrypt imgconv.py)
+* `zuber/django-cas-consumer <http://github.com/zuber/django-cas-consumer>`_ (wymagane do autoryzacji przez CAS)
+
+Instalacja
+**********
+1. Ściągnij i zainstaluj `pip <http://pypi.python.org/pypi/pip>`_
+2. Przejdź do katalogu serwisu w konsoli
+3. Zainstaluj wymagane biblioteki (patrz sekcja wymagania_) komendą::
+
+ pip install -f http://redmine.nowoczesnapolska.org.pl/projects/librarian/files -r requirements.txt
+
+4. Wypełnij bazę danych (Django poprosi o utworzenie pierwszego użytkownika)::
+
+ ./manage.py syncdb
+
+5. Skopiuj zawartość pliku `project/localsettings.sample` do `project/localsettings.py` i zmień go zgodnie ze swoimi potrzebami.
+
+6. Uruchom serwer deweloperski::
+
+ ./manage.py runserver
+
+7. Zalecane jest serwowanie aplikacji przez `modwsgi <http://code.google.com/p/modwsgi/>`_ na serwerze `Apache2 <http://httpd.apache.org/>`_ przy pomocy załączonego skryptu `dispatch.fcgi`. Inne strategie wdrożeniowe opisane są w `Dokumentacji Django <http://docs.djangoproject.com/en/dev/howto/deployment/#howto-deployment-index>`_.
+
+++ /dev/null
-Zależności
-==========
-
- * [Django 1.1](http://djangoproject.com/)
- * [Mercurial 1.3.1](http://www.selenic.com/mercurial/)
- * [librarian 1.1](http://redmine.nowoczesnapolska.org.pl/projects/show/librarian)
- * [PIL 1.1.6](http://www.pythonware.com/products/pil/) (wymagane przez skrypt imgconv.py)
- * [pngnq](http://pngnq.sourceforge.net/) (wymagane przez skrypt imgconv.py)
-
-Moduły
-======
-
- * redmine -- wtyczka do Redmine dodająca informacje o publikacjach do zagadnień.
--- /dev/null
+#
+# localsettings template for Platforma
+#
+# Duplicate this file as localsettings.py and change it to your liking.
+# Settings defined in localsettings.py will override settings from
+# settings.py file. localsettings.py should never be commited
+# to a version control system. Please make changes to settings.py
+# or localsettings.sample instead.
+#
+
+# Path to repository with managed documents
+REPOSITORY_PATH = '/home/user/repository'
+
+# Subdirectory of STATIC_ROOT containing images
+IMAGE_DIR = 'images'
+
+# Authentication via Central Authentication Server
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.admin',
+ 'django.contrib.admindocs',
+
+ 'cas_consumer',
+ 'explorer',
+ 'toolbar',
+ 'api',
+ 'wysiwyg',
+)
+
+AUTHENTICATION_BACKENDS = (
+ 'cas_consumer.backends.CASBackend',
+)
+
+CAS_BASE = 'http://localhost:7000/'
+CAS_SERVICE = 'http://localhost:8000/accounts/login/'
+
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = (
- PROJECT_ROOT + '/templates',
+ PROJECT_ROOT + '/templates',
)
# CSS and JS files to compress
{% if user.is_authenticated %}
<span class="user_name">{{ user.username }}</span> |
-<a href='{% url django.contrib.auth.views.logout %}?next={{request.get_full_path}}'>Wyloguj</a>
+<a href='{% url logout %}?next={{request.get_full_path}}'>Wyloguj</a>
{% else %}
-{% url django.contrib.auth.views.login as login_url %}
+{% url login as login_url %}
{% ifnotequal login_url request.path %}
- <a href='{% url django.contrib.auth.views.login %}?next={{request.get_full_path}}'>Logowanie</a>
+ <a href='{{ login_url }}?next={{request.get_full_path}}'>Logowanie</a>
{% endifnotequal %}
{% endif %}
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/(.*)', admin.site.root),
- # Authorization
- url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'redirect_field_name': 'next'}),
- url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
-
# Prototypes
url(r'^wysiwyg-proto/', include('wysiwyg.urls')),
# Our über-restful api
url(r'^api/', include('api.urls') ),
+
)
+if 'cas_consumer' in settings.INSTALLED_APPS:
+ urlpatterns += patterns('',
+ # django-cas-consumer
+ url(r'^accounts/login/$', 'cas_consumer.views.login', name='login'),
+ url(r'^accounts/logout/$', 'cas_consumer.views.logout', name='logout'),
+ )
+else:
+ urlpatterns += patterns('',
+ # Django auth
+ url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'redirect_field_name': 'next'}, name='login'),
+ url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
+ )
# Static files
if settings.DEBUG and not hasattr(settings, 'DONT_SERVE_STATIC'):
url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
)
+#
\ No newline at end of file
--- /dev/null
+Django==1.1
+django-piston==0.2.3rc1
+librarian==1.2.2
+lxml==2.2.2
+mercurial==1.3.1
+-e git://github.com/zuber/django-cas-consumer.git#egg=django-cas-consumer
\ No newline at end of file