-i https://py.mdrn.pl/simple
## Python libraries
-Mercurial>=3.3,<3.4
+merge3==0.0.2
PyYAML>=3.0
Pillow
oauth2
httplib2 # oauth2 dependency
+python-slugify
-librarian
+librarian==1.7.1
## Django
Django==1.11.20
fnpdjango==0.3
django-pipeline==1.6.14
-django_cas>=2.1,<2.2
+django-cas-ng==3.6.0
sorl-thumbnail>=12.2,<12.4 # ??
django-maintenancemode>=0.9
fnp-django-pagination==2.2.2
-django-gravatar2
-python-slugify
-django-extensions==1.5.7
+django-gravatar2==1.4.2
+django-extensions==2.1.6
raven
<img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" />
</form>
{% else %}
- <a href="{% url 'login' %}">{% trans "Log in to publish." %}</a>
+ <a href="{% url 'cas_ng_login' %}">{% trans "Log in to publish." %}</a>
{% endif %}
{% else %}
<p>{% trans "This book can't be published yet, because:" %}</p>
<!--img src="{{ STATIC_URL }}img/angel-right.png" style="vertical-align: middle" /-->
</form>
{% else %}
- <a href="{% url 'login' %}">{% trans "Log in to publish." %}</a>
+ <a href="{% url 'cas_ng_login' %}">{% trans "Log in to publish." %}</a>
{% endif %}
{% else %}
<p>{% trans "This book can't be published yet, because:" %}</p>
from django.utils.http import urlquote_plus
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.http import require_POST
-from django_cas.decorators import user_passes_test
+from django_cas_ng.decorators import user_passes_test
from apiclient import NotAuthorizedError
from catalogue import forms
from django.db import models, transaction
from django.db.models.base import ModelBase
from django.utils.translation import string_concat, ugettext_lazy as _
-from mercurial import simplemerge
+import merge3
from django.conf import settings
from dvcs.signals import post_commit, post_publishable
# immediate child - fast forward
return other
- local = self.materialize().encode('utf-8')
- base = other.parent.materialize().encode('utf-8')
- remote = other.materialize().encode('utf-8')
+ local = self.materialize().splitlines(True)
+ base = other.parent.materialize().splitlines(True)
+ remote = other.materialize().splitlines(True)
- merge = simplemerge.Merge3Text(base, local, remote)
+ merge = merge3.Merge3(base, local, remote)
result = ''.join(merge.merge_lines())
merge_node = self.children.create(
merge_parent=other, tree=self.tree,
# Subdirectory of MEDIA_ROOT containing images
IMAGE_DIR = 'images/'
-CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/'
-CAS_VERSION = '3'
+CAS_SERVER_URL = 'https://logowanie.nowoczesnapolska.org.pl/cas/'
+CAS_VERSION = '2'
-REDMINE_URL = 'http://redmine.nowoczesnapolska.org.pl/'
+REDMINE_URL = 'https://redmine.nowoczesnapolska.org.pl/'
DEBUG = True
MAINTENANCE_MODE = False
COMPRESS = False
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django_cas.middleware.CASMiddleware',
+ 'django_cas_ng.middleware.CASMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware',
'fnp_django_pagination.middleware.PaginationMiddleware',
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
- 'fnpdjango.auth_backends.AttrCASBackend',
+ 'django_cas_ng.backends.CASBackend',
)
ROOT_URLCONF = 'redakcja.urls'
'fileupload',
'pipeline',
'fnpdjango',
+ 'django_cas_ng',
'catalogue',
'cover',
SHOW_APP_VERSION = False
-CAS_USER_ATTRS_MAP = {
+CAS_APPLY_ATTRIBUTES_TO_USER = True
+CAS_RENAME_ATTRIBUTES = {
'email': 'email', 'firstname': 'first_name', 'lastname': 'last_name'}
<a href='{% url "logout" %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
{% else %}
-{% url "login" as login_url %}
+{% url "cas_ng_login" as login_url %}
{% ifnotequal login_url request.path %}
<a href='{{ login_url }}'>{% trans "Log In" %}</a>
{% endifnotequal %}
{% block content %}
<div class="isection">
-<form method="POST" action="{% url 'login' %}">
+<form method="POST" action="{% url 'cas_ng_login' %}">
{% csrf_token %}
{{ form.as_p }}
<p><input type="submit" value="Login" /></p>
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import RedirectView
-import django_cas.views
+import django_cas_ng.views
admin.autodiscover()
urlpatterns = [
# Auth
- url(r'^accounts/login/$', django_cas.views.login, name='login'),
- url(r'^accounts/logout/$', django_cas.views.logout, name='logout'),
- url(r'^admin/login/$', django_cas.views.login, name='login'),
- url(r'^admin/logout/$', django_cas.views.logout, name='logout'),
+ url(r'^accounts/login/$', django_cas_ng.views.LoginView.as_view(), name='cas_ng_login'),
+ url(r'^accounts/logout/$', django_cas_ng.views.LogoutView.as_view(), name='logout'),
+ #url(r'^admin/login/$', django_cas_ng.views.login, name='login'),
+ #url(r'^admin/logout/$', django_cas_ng.views.logout, name='logout'),
# Admin panel
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),