Merge pull request #44 from nitmir/dev

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
This commit is contained in:
Valentin Samir 2019-03-02 11:45:41 +01:00 committed by GitHub
commit d106181b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 46 additions and 8 deletions

View File

@ -15,6 +15,10 @@ matrix:
env: TOX_ENV=py35-django20 env: TOX_ENV=py35-django20
- python: "3.6" - python: "3.6"
env: TOX_ENV=py36-django20 env: TOX_ENV=py36-django20
- python: "3.5"
env: TOX_ENV=py35-django21
- python: "3.6"
env: TOX_ENV=py36-django21
- python: "2.7" - python: "2.7"
env: TOX_ENV=coverage env: TOX_ENV=coverage
cache: cache:

View File

@ -6,12 +6,27 @@ All notable changes to this project will be documented in this file.
.. contents:: Table of Contents .. contents:: Table of Contents
:depth: 2 :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 v1.0.0 - 2019-01-12
=================== ===================
Added Added
----- -----
* Support for python 3.6 and Django 1.11 * Support for python 3.6 and Django 1.11
* Support for Django 2.0 * Support for Django 2.0
* Keep query string then redirecting from / to /login * Keep query string then redirecting from / to /login

View File

@ -11,7 +11,7 @@
"""A django CAS server application""" """A django CAS server application"""
#: version of the application #: version of the application
VERSION = '1.0.0' VERSION = '1.1.0'
#: path the the application configuration class #: path the the application configuration class
default_app_config = 'cas_server.apps.CasAppConfig' default_app_config = 'cas_server.apps.CasAppConfig'

View File

@ -277,6 +277,7 @@ class LdapAuthUser(DBAuthUser): # pragma: no cover
settings.CAS_LDAP_SERVER, settings.CAS_LDAP_SERVER,
settings.CAS_LDAP_USER, settings.CAS_LDAP_USER,
settings.CAS_LDAP_PASSWORD, settings.CAS_LDAP_PASSWORD,
client_strategy="RESTARTABLE",
auto_bind=True auto_bind=True
) )
cls._conn = conn cls._conn = conn

View File

@ -11,7 +11,7 @@
# (c) 2015-2016 Valentin Samir # (c) 2015-2016 Valentin Samir
"""Default values for the app's settings""" """Default values for the app's settings"""
from django.conf import 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 django.utils.translation import ugettext_lazy as _
from importlib import import_module from importlib import import_module

View File

@ -31,7 +31,10 @@ class BootsrapForm(forms.Form):
# Only tweak the field if it will be displayed # Only tweak the field if it will be displayed
if not isinstance(field.widget, widgets.HiddenInput): if not isinstance(field.widget, widgets.HiddenInput):
attrs = {} 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" attrs['class'] = "form-control"
if isinstance(field.widget, (widgets.Input, widgets.Textarea)) and field.label: if isinstance(field.widget, (widgets.Input, widgets.Textarea)) and field.label:
attrs["placeholder"] = field.label attrs["placeholder"] = field.label

View File

@ -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 %}> <html{% if LANGUAGE_CODE %} lang="{{LANGUAGE_CODE}}"{% endif %}>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">

View File

@ -1,5 +1,5 @@
{% extends "cas_server/base.html" %} {% extends "cas_server/base.html" %}
{% load staticfiles %} {% load static %}
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
<div class="alert alert-success" role="alert">{{logout_msg}}</div> <div class="alert alert-success" role="alert">{{logout_msg}}</div>

View File

@ -1,5 +1,5 @@
{% extends "cas_server/base.html" %} {% extends "cas_server/base.html" %}
{% load staticfiles %} {% load static %}
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}

View File

@ -1,4 +1,4 @@
Django >= 1.11,<2.1 Django >= 1.11,<2.2
setuptools>=5.5 setuptools>=5.5
requests>=2.4 requests>=2.4
requests_futures>=0.9.5 requests_futures>=0.9.5

View File

@ -33,6 +33,7 @@ if __name__ == '__main__':
'Framework :: Django', 'Framework :: Django',
'Framework :: Django :: 1.11', 'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0', 'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Intended Audience :: System Administrators', 'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
@ -57,7 +58,7 @@ if __name__ == '__main__':
}, },
keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'], keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
install_requires=[ 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' 'lxml >= 3.4', 'six >= 1'
], ],
url="https://github.com/nitmir/django-cas-server", url="https://github.com/nitmir/django-cas-server",

14
tox.ini
View File

@ -7,6 +7,8 @@ envlist=
py36-django111, py36-django111,
py35-django20, py35-django20,
py36-django20, py36-django20,
py35-django21,
py36-django21,
[flake8] [flake8]
max-line-length=100 max-line-length=100
@ -104,6 +106,18 @@ deps =
Django>=2.0,<2.1 Django>=2.0,<2.1
{[base]deps} {[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] [testenv:flake8]