diff -Nru python-django-bootstrap-form-3.2.1/bootstrapform/meta.py python-django-bootstrap-form-3.3/bootstrapform/meta.py --- python-django-bootstrap-form-3.2.1/bootstrapform/meta.py 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/bootstrapform/meta.py 2017-08-03 17:06:29.000000000 +0000 @@ -1,5 +1,5 @@ from distutils.version import StrictVersion -VERSION = StrictVersion('3.2.1') +VERSION = StrictVersion('3.3') diff -Nru python-django-bootstrap-form-3.2.1/bootstrapform/templatetags/bootstrap.py python-django-bootstrap-form-3.3/bootstrapform/templatetags/bootstrap.py --- python-django-bootstrap-form-3.2.1/bootstrapform/templatetags/bootstrap.py 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/bootstrapform/templatetags/bootstrap.py 2017-08-03 17:06:29.000000000 +0000 @@ -1,3 +1,4 @@ +import django from django import forms, VERSION as django_version from django.template import Context from django.template.loader import get_template @@ -60,7 +61,7 @@ if element_type == 'boundfield': add_input_classes(element) template = get_template("bootstrapform/field.html") - context = Context({'field': element, 'classes': markup_classes, 'form': element.form}) + context = {'field': element, 'classes': markup_classes, 'form': element.form} else: has_management = getattr(element, 'management_form', None) if has_management: @@ -69,16 +70,17 @@ add_input_classes(field) template = get_template("bootstrapform/formset.html") - context = Context({'formset': element, 'classes': markup_classes}) + context = {'formset': element, 'classes': markup_classes} else: for field in element.visible_fields(): add_input_classes(field) template = get_template("bootstrapform/form.html") - context = Context({'form': element, 'classes': markup_classes}) + context = {'form': element, 'classes': markup_classes} - if django_version >= (1, 8): - context = context.flatten() + + if django_version < (1, 8): + context = Context(context) return template.render(context) diff -Nru python-django-bootstrap-form-3.2.1/bootstrapform/tests.py python-django-bootstrap-form-3.3/bootstrapform/tests.py --- python-django-bootstrap-form-3.2.1/bootstrapform/tests.py 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/bootstrapform/tests.py 2017-08-03 17:06:29.000000000 +0000 @@ -6,6 +6,7 @@ from django.template import Template, Context from django import forms +from .templatetags import bootstrap TEST_DIR = os.path.abspath(os.path.join(__file__, '..')) @@ -23,15 +24,15 @@ pass class ExampleForm(forms.Form): - char_field = forms.CharField() - choice_field = forms.ChoiceField(choices=CHOICES) - radio_choice = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect) - multiple_choice = forms.MultipleChoiceField(choices=CHOICES) - multiple_checkbox = forms.MultipleChoiceField(choices=CHOICES, widget=forms.CheckboxSelectMultiple) - file_fied = forms.FileField() - password_field = forms.CharField(widget=forms.PasswordInput) - textarea = forms.CharField(widget=forms.Textarea) - boolean_field = forms.BooleanField() + char_field = forms.CharField(required=False) + choice_field = forms.ChoiceField(choices=CHOICES, required=False) + radio_choice = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect, required=False) + multiple_choice = forms.MultipleChoiceField(choices=CHOICES, required=False) + multiple_checkbox = forms.MultipleChoiceField(choices=CHOICES, widget=forms.CheckboxSelectMultiple, required=False) + file_fied = forms.FileField(required=False) + password_field = forms.CharField(widget=forms.PasswordInput, required=False) + textarea = forms.CharField(widget=forms.Textarea, required=False) + boolean_field = forms.BooleanField(required=False) class BootstrapTemplateTagTests(TestCase): @@ -73,3 +74,9 @@ content = f.read() self.assertHTMLEqual(html, content) + + def test_bound_field(self): + form = ExampleForm(data={'char_field': 'asdf'}) + + self.assertTrue(form.is_bound) + rendered_template = bootstrap.bootstrap(form['char_field']) diff -Nru python-django-bootstrap-form-3.2.1/debian/changelog python-django-bootstrap-form-3.3/debian/changelog --- python-django-bootstrap-form-3.2.1/debian/changelog 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/changelog 2017-12-16 13:09:37.000000000 +0000 @@ -1,21 +1,18 @@ -python-django-bootstrap-form (3.2.1-3) unstable; urgency=medium +python-django-bootstrap-form (3.3-1) unstable; urgency=medium - [ Daniel Baumann ] - * Updating vcs fields. - * Updating copyright format url. - * Updating maintainer field. - * Running wrap-and-sort -bast. - * Updating standards version to 4.0.0. - * Removing gbp.conf, not used anymore or should be specified in the - developers dotfiles. - * Updating standards version to 4.0.1. - * Updating standards version to 4.1.0. + [ Sunil Mohan Adapa ] + * New upstream release (Closes: #876974). + * d/control: Change maintainer to FreedomBox Packaging Team. Many + thanks to Open Stack team for maintaining so far. + * Refresh patches: + - django-1.10-fix-settings-in-runtests.py.patch + * Remove patches: + - django-1.10-add-Django-1.10-fixtures.html.patch + * Standards-Version is now 4.1.2. + * Build depend on python3-sphinx instead of python-sphinx. + * Update VCS URLs to point to new FreedomBox repositories. - [ Thomas Goirand ] - * Apply patch from Johannes Keyser to fix tests - with Django 1.11 (Closes: #865938). - - -- Thomas Goirand Thu, 24 Aug 2017 14:54:38 +0000 + -- Federico Ceratto Sat, 16 Dec 2017 13:09:37 +0000 python-django-bootstrap-form (3.2.1-2) unstable; urgency=medium diff -Nru python-django-bootstrap-form-3.2.1/debian/control python-django-bootstrap-form-3.3/debian/control --- python-django-bootstrap-form-3.2.1/debian/control 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/control 2017-12-16 13:09:37.000000000 +0000 @@ -1,24 +1,25 @@ Source: python-django-bootstrap-form Section: python Priority: optional -Maintainer: Debian OpenStack +Maintainer: FreedomBox Packaging Team Uploaders: - Thomas Goirand , + Sunil Mohan Adapa , + Federico Ceratto Build-Depends: debhelper (>= 9), dh-python, openstack-pkg-tools (>= 52~), python-all, python-setuptools, - python-sphinx, python3-all, python3-setuptools, + python3-sphinx, Build-Depends-Indep: python-django, python3-django, -Standards-Version: 4.1.0 -Vcs-Browser: https://anonscm.debian.org/cgit/openstack/python/python-django-bootstrap-form.git -Vcs-Git: https://anonscm.debian.org/git/openstack/python/python-django-bootstrap-form.git +Standards-Version: 4.1.2 +Vcs-Browser: https://anonscm.debian.org/cgit/freedombox/python-django-bootstrap-form.git/ +Vcs-Git: https://anonscm.debian.org/git/freedombox/python-django-bootstrap-form.git Homepage: https://github.com/tzangms/django-bootstrap-form Package: python-bootstrapform diff -Nru python-django-bootstrap-form-3.2.1/debian/gbp.conf python-django-bootstrap-form-3.3/debian/gbp.conf --- python-django-bootstrap-form-3.2.1/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/gbp.conf 2017-12-16 13:09:37.000000000 +0000 @@ -0,0 +1,9 @@ +[DEFAULT] +upstream-branch = master +debian-branch = debian/unstable +upstream-tag = %(version)s +compression = xz + +[buildpackage] +export-dir = ../build-area/ + diff -Nru python-django-bootstrap-form-3.2.1/debian/patches/django-1.10-add-Django-1.10-fixtures.html.patch python-django-bootstrap-form-3.3/debian/patches/django-1.10-add-Django-1.10-fixtures.html.patch --- python-django-bootstrap-form-3.2.1/debian/patches/django-1.10-add-Django-1.10-fixtures.html.patch 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/patches/django-1.10-add-Django-1.10-fixtures.html.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,236 +0,0 @@ -Description: Add Django 1.10 fixtures -Author: Thomas Goirand -Forwarded: https://github.com/tzangms/django-bootstrap-form/pull/86 -Last-Update: 2016-07-26 - ---- /dev/null -+++ python-django-bootstrap-form-3.2.1/bootstrapform/fixtures/basic_dj110.html -@@ -0,0 +1,99 @@ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+
    -+
  • -+
  • -+
  • -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+
-+
---- /dev/null -+++ python-django-bootstrap-form-3.2.1/bootstrapform/fixtures/horizontal_dj110.html -@@ -0,0 +1,102 @@ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+
-+ -+
-+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+
-+
    -+
  • -+
  • -+
  • -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+
-+
---- python-django-bootstrap-form-3.2.1.orig/bootstrapform/tests.py -+++ python-django-bootstrap-form-3.2.1/bootstrapform/tests.py -@@ -43,7 +43,9 @@ class BootstrapTemplateTagTests(TestCase - html = Template("{% load bootstrap %}{{ form|bootstrap }}").render(Context({'form': form})) - - -- if StrictVersion(django.get_version()) >= StrictVersion('1.7'): -+ if StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): -+ fixture = 'basic_dj110.html' -+ elif StrictVersion(django.get_version()) >= StrictVersion('1.7'): - fixture = 'basic.html' - elif StrictVersion(django.get_version()) >= StrictVersion('1.6'): - fixture = 'basic_dj16.html' -@@ -61,7 +63,9 @@ class BootstrapTemplateTagTests(TestCase - - html = Template("{% load bootstrap %}{{ form|bootstrap_horizontal }}").render(Context({'form': form})) - -- if StrictVersion(django.get_version()) >= StrictVersion('1.7'): -+ if StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): -+ fixture = 'horizontal_dj110.html' -+ elif StrictVersion(django.get_version()) >= StrictVersion('1.7'): - fixture = 'horizontal.html' - elif StrictVersion(django.get_version()) >= StrictVersion('1.6'): - fixture = 'horizontal_dj16.html' diff -Nru python-django-bootstrap-form-3.2.1/debian/patches/django-1.10-fix-settings-in-runtests.py.patch python-django-bootstrap-form-3.3/debian/patches/django-1.10-fix-settings-in-runtests.py.patch --- python-django-bootstrap-form-3.2.1/debian/patches/django-1.10-fix-settings-in-runtests.py.patch 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/patches/django-1.10-fix-settings-in-runtests.py.patch 2017-12-16 13:09:37.000000000 +0000 @@ -3,47 +3,33 @@ Forwarded: https://github.com/tzangms/django-bootstrap-form/pull/86 Last-Update: 2016-07-26 ---- python-django-bootstrap-form-3.2.1.orig/runtests.py -+++ python-django-bootstrap-form-3.2.1/runtests.py -@@ -1,12 +1,13 @@ - #!/usr/bin/env python - -+import os - import sys - import django - from os.path import dirname, abspath +--- a/runtests.py ++++ b/runtests.py +@@ -6,8 +6,6 @@ from django.conf import settings - -+local_path = lambda path: os.path.join(os.path.dirname(__file__), path) - +- settings.configure( DATABASES = { -@@ -34,6 +35,26 @@ settings.configure( - SITE_ID=1, + 'default': { +@@ -35,7 +33,17 @@ DEBUG=False, ROOT_URLCONF='', -+ -+ TEMPLATES = [ + TEMPLATES = [ # For >= Django 1.10 +- {'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True}, + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', -+ 'DIRS': [local_path('templates'), ], ++ 'APP_DIRS': True, + 'OPTIONS': { -+ 'debug': False, + 'context_processors': [ -+ 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], -+ 'loaders': [ -+ 'django.template.loaders.filesystem.Loader', -+ 'django.template.loaders.app_directories.Loader', -+ ], + }, + }, -+] + ] ) - diff -Nru python-django-bootstrap-form-3.2.1/debian/patches/Fixed-fixture-html-files-for-Django-1.11.3-Closes-865938.patch python-django-bootstrap-form-3.3/debian/patches/Fixed-fixture-html-files-for-Django-1.11.3-Closes-865938.patch --- python-django-bootstrap-form-3.2.1/debian/patches/Fixed-fixture-html-files-for-Django-1.11.3-Closes-865938.patch 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/patches/Fixed-fixture-html-files-for-Django-1.11.3-Closes-865938.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,257 +0,0 @@ -From 14569b763dcfa2b48e33937ec73aeb275c40726b Mon Sep 17 00:00:00 2001 -From: Johannes Keyser -Date: Sun, 9 Jul 2017 19:47:00 +0200 -Subject: [PATCH] Fixed fixture html files for Django 1.11.3 (Closes: - #865938). - ---- - bootstrapform/fixtures/basic_dj111.html | 99 ++++++++++++++++++++++++++ - bootstrapform/fixtures/horizontal_dj111.html | 102 +++++++++++++++++++++++++++ - bootstrapform/tests.py | 9 ++- - 3 files changed, 207 insertions(+), 3 deletions(-) - create mode 100644 bootstrapform/fixtures/basic_dj111.html - create mode 100644 bootstrapform/fixtures/horizontal_dj111.html - -diff --git a/bootstrapform/fixtures/basic_dj111.html b/bootstrapform/fixtures/basic_dj111.html -new file mode 100644 -index 0000000..87c4948 ---- /dev/null -+++ b/bootstrapform/fixtures/basic_dj111.html -@@ -0,0 +1,99 @@ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+ -+
-+ -+
-+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+ -+
-+
    -+
  • -+
  • -+
  • -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+
-+
-diff --git a/bootstrapform/fixtures/horizontal_dj111.html b/bootstrapform/fixtures/horizontal_dj111.html -new file mode 100644 -index 0000000..038bfe1 ---- /dev/null -+++ b/bootstrapform/fixtures/horizontal_dj111.html -@@ -0,0 +1,102 @@ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+
-+ -+
-+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+
-+
    -+
  • -+
  • -+
  • -+
-+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+ -+ -+
-+ -+
-+
-+ -+
-+
-+
-+ -+
-+
-+
-diff --git a/bootstrapform/tests.py b/bootstrapform/tests.py -index 571ac9e..458b810 100644 ---- a/bootstrapform/tests.py -+++ b/bootstrapform/tests.py -@@ -42,8 +42,9 @@ class BootstrapTemplateTagTests(TestCase): - - html = Template("{% load bootstrap %}{{ form|bootstrap }}").render(Context({'form': form})) - -- -- if StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): -+ if StrictVersion(django.get_version()) >= StrictVersion('1.11.3'): -+ fixture = 'basic_dj111.html' -+ elif StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): - fixture = 'basic_dj110.html' - elif StrictVersion(django.get_version()) >= StrictVersion('1.7'): - fixture = 'basic.html' -@@ -63,7 +64,9 @@ class BootstrapTemplateTagTests(TestCase): - - html = Template("{% load bootstrap %}{{ form|bootstrap_horizontal }}").render(Context({'form': form})) - -- if StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): -+ if StrictVersion(django.get_version()) >= StrictVersion('1.11.3'): -+ fixture = 'horizontal_dj111.html' -+ elif StrictVersion(django.get_version()) >= StrictVersion('1.10b1'): - fixture = 'horizontal_dj110.html' - elif StrictVersion(django.get_version()) >= StrictVersion('1.7'): - fixture = 'horizontal.html' --- -2.13.2 - diff -Nru python-django-bootstrap-form-3.2.1/debian/patches/series python-django-bootstrap-form-3.3/debian/patches/series --- python-django-bootstrap-form-3.2.1/debian/patches/series 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/patches/series 2017-12-16 13:09:37.000000000 +0000 @@ -1,3 +1 @@ django-1.10-fix-settings-in-runtests.py.patch -django-1.10-add-Django-1.10-fixtures.html.patch -Fixed-fixture-html-files-for-Django-1.11.3-Closes-865938.patch diff -Nru python-django-bootstrap-form-3.2.1/debian/rules python-django-bootstrap-form-3.3/debian/rules --- python-django-bootstrap-form-3.2.1/debian/rules 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/rules 2017-12-16 13:09:37.000000000 +0000 @@ -7,7 +7,8 @@ dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc override_dh_sphinxdoc: - PYTHONPATH=$(CURDIR) sphinx-build -b html docs debian/python-bootstrapform-doc/usr/share/doc/python-bootstrapform-doc/html + PYTHONPATH=$(CURDIR) http_proxy='http://127.0.0.1:9/' sphinx-build -b html docs \ + debian/python-bootstrapform-doc/usr/share/doc/python-bootstrapform-doc/html dh_sphinxdoc -O--buildsystem=python_distutils override_dh_auto_install: diff -Nru python-django-bootstrap-form-3.2.1/debian/watch python-django-bootstrap-form-3.3/debian/watch --- python-django-bootstrap-form-3.2.1/debian/watch 2017-08-24 14:54:38.000000000 +0000 +++ python-django-bootstrap-form-3.3/debian/watch 2017-12-16 13:09:37.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -http://pypi.debian.net/django-bootstrap-form/django-bootstrap-form-(.*).tar.gz +https://pypi.debian.net/django-bootstrap-form/django-bootstrap-form-(.*).tar.gz diff -Nru python-django-bootstrap-form-3.2.1/.gitignore python-django-bootstrap-form-3.3/.gitignore --- python-django-bootstrap-form-3.2.1/.gitignore 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/.gitignore 2017-08-03 17:06:29.000000000 +0000 @@ -8,3 +8,4 @@ .cache .tox .python-version +.idea diff -Nru python-django-bootstrap-form-3.2.1/runtests.py python-django-bootstrap-form-3.3/runtests.py --- python-django-bootstrap-form-3.2.1/runtests.py 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/runtests.py 2017-08-03 17:06:29.000000000 +0000 @@ -34,6 +34,9 @@ SITE_ID=1, DEBUG=False, ROOT_URLCONF='', + TEMPLATES = [ # For >= Django 1.10 + {'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True}, + ] ) diff -Nru python-django-bootstrap-form-3.2.1/tox.ini python-django-bootstrap-form-3.3/tox.ini --- python-django-bootstrap-form-3.2.1/tox.ini 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/tox.ini 2017-08-03 17:06:29.000000000 +0000 @@ -1,5 +1,5 @@ [tox] -envlist = {py27,py34}-dj{15,16,17,18,19} +envlist = {py27,py34}-dj{15,16,17,18,19,110,111} skipsdist=True @@ -14,6 +14,8 @@ dj17: django>=1.7,<1.8 dj18: django>=1.8,<1.9 dj19: django>=1.9,<1.10 + dj110: django>=1.10,<1.11 + dj111: django>=1.10,<1.11 commands = python setup.py test diff -Nru python-django-bootstrap-form-3.2.1/.travis.yml python-django-bootstrap-form-3.3/.travis.yml --- python-django-bootstrap-form-3.2.1/.travis.yml 2016-04-26 05:24:29.000000000 +0000 +++ python-django-bootstrap-form-3.3/.travis.yml 2017-08-03 17:06:29.000000000 +0000 @@ -6,14 +6,16 @@ - TOX_ENV=py27-dj16 - TOX_ENV=py27-dj17 - TOX_ENV=py27-dj18 + - TOX_ENV=py27-dj19 + - TOX_ENV=py27-dj110 + - TOX_ENV=py27-dj111 - TOX_ENV=py34-dj15 - TOX_ENV=py34-dj16 - TOX_ENV=py34-dj17 - TOX_ENV=py34-dj18 - -python: - - "2.7" - - "3.4" + - TOX_ENV=py34-dj19 + - TOX_ENV=py34-dj110 + - TOX_ENV=py34-dj111 install: - pip install tox coverage coveralls