Skip to content

Commit

Permalink
Merge pull request #44 from nitmir/dev
Browse files Browse the repository at this point in the history
Update to version 1.0.0

v1.1.0 - 2019-03-02
===================

Added
-----

* Support for Django 2.1

Fixes
-----

* Checkbox position on the login page
* Set ldap3 client_strategy from sync to sync-restartable
* Deprecation warning for {% load staticfiles %} and django.contrib.staticfiles
  • Loading branch information
nitmir committed Mar 2, 2019
2 parents 7e0bf93 + bd9aedd commit d106181
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -15,6 +15,10 @@ matrix:
env: TOX_ENV=py35-django20
- python: "3.6"
env: TOX_ENV=py36-django20
- python: "3.5"
env: TOX_ENV=py35-django21
- python: "3.6"
env: TOX_ENV=py36-django21
- python: "2.7"
env: TOX_ENV=coverage
cache:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -6,12 +6,27 @@ All notable changes to this project will be documented in this file.
.. contents:: Table of Contents
:depth: 2

v1.1.0 - 2019-03-02
===================

Added
-----

* Support for Django 2.1

Fixes
-----

* Checkbox position on the login page
* Set ldap3 client_strategy from sync to sync-restartable
* Deprecation warning for {% load staticfiles %} and django.contrib.staticfiles

v1.0.0 - 2019-01-12
===================

Added
-----

* Support for python 3.6 and Django 1.11
* Support for Django 2.0
* Keep query string then redirecting from / to /login
Expand Down
2 changes: 1 addition & 1 deletion cas_server/__init__.py
Expand Up @@ -11,7 +11,7 @@
"""A django CAS server application"""

#: version of the application
VERSION = '1.0.0'
VERSION = '1.1.0'

#: path the the application configuration class
default_app_config = 'cas_server.apps.CasAppConfig'
1 change: 1 addition & 0 deletions cas_server/auth.py
Expand Up @@ -277,6 +277,7 @@ def get_conn(cls):
settings.CAS_LDAP_SERVER,
settings.CAS_LDAP_USER,
settings.CAS_LDAP_PASSWORD,
client_strategy="RESTARTABLE",
auto_bind=True
)
cls._conn = conn
Expand Down
2 changes: 1 addition & 1 deletion cas_server/default_settings.py
Expand Up @@ -11,7 +11,7 @@
# (c) 2015-2016 Valentin Samir
"""Default values for the app's settings"""
from django.conf import settings
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.templatetags.static import static
from django.utils.translation import ugettext_lazy as _

from importlib import import_module
Expand Down
5 changes: 4 additions & 1 deletion cas_server/forms.py
Expand Up @@ -31,7 +31,10 @@ def __init__(self, *args, **kwargs):
# Only tweak the field if it will be displayed
if not isinstance(field.widget, widgets.HiddenInput):
attrs = {}
if isinstance(field.widget, (widgets.Input, widgets.Select, widgets.Textarea)):
if (
isinstance(field.widget, (widgets.Input, widgets.Select, widgets.Textarea)) and
not isinstance(field.widget, (widgets.CheckboxInput,))
):
attrs['class'] = "form-control"
if isinstance(field.widget, (widgets.Input, widgets.Textarea)) and field.label:
attrs["placeholder"] = field.label
Expand Down
2 changes: 1 addition & 1 deletion cas_server/templates/cas_server/base.html
@@ -1,4 +1,4 @@
{% load i18n %}{% load staticfiles %}{% get_current_language as LANGUAGE_CODE %}<!DOCTYPE html>
{% load i18n %}{% load static %}{% get_current_language as LANGUAGE_CODE %}<!DOCTYPE html>
<html{% if LANGUAGE_CODE %} lang="{{LANGUAGE_CODE}}"{% endif %}>
<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion cas_server/templates/cas_server/logout.html
@@ -1,5 +1,5 @@
{% extends "cas_server/base.html" %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="alert alert-success" role="alert">{{logout_msg}}</div>
Expand Down
2 changes: 1 addition & 1 deletion cas_server/templates/cas_server/warn.html
@@ -1,5 +1,5 @@
{% extends "cas_server/base.html" %}
{% load staticfiles %}
{% load static %}
{% load i18n %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
Django >= 1.11,<2.1
Django >= 1.11,<2.2
setuptools>=5.5
requests>=2.4
requests_futures>=0.9.5
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -33,6 +33,7 @@
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
Expand All @@ -57,7 +58,7 @@
},
keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
install_requires=[
'Django >= 1.11,<2.1', 'requests >= 2.4', 'requests_futures >= 0.9.5',
'Django >= 1.11,<2.2', 'requests >= 2.4', 'requests_futures >= 0.9.5',
'lxml >= 3.4', 'six >= 1'
],
url="https://github.com/nitmir/django-cas-server",
Expand Down
14 changes: 14 additions & 0 deletions tox.ini
Expand Up @@ -7,6 +7,8 @@ envlist=
py36-django111,
py35-django20,
py36-django20,
py35-django21,
py36-django21,

[flake8]
max-line-length=100
Expand Down Expand Up @@ -104,6 +106,18 @@ deps =
Django>=2.0,<2.1
{[base]deps}

[testenv:py35-django21]
basepython=python3.5
deps =
Django>=2.1,<2.2
{[base]deps}

[testenv:py36-django21]
basepython=python3.6
deps =
Django>=2.1,<2.2
{[base]deps}



[testenv:flake8]
Expand Down

0 comments on commit d106181

Please sign in to comment.