forked from pool/python-WTForms
- version update to 2.2.1
* :class:`~fields.StringField` only sets ``data = ''` when form data
is empty and an initial value was not provided. This fixes an issue
where the default value wasn't rendered with the initial form.
(`#291`_, `#355`_, `#401`_)
* Merged new and updated translations from the community.
* Passing ``data_`` args to render a field converts all the
underscores to hyphens when rendering the HTML attribute, not just
the first one. ``data_foo_bar`` becomes ``data-foo-bar``. (`#248`_)
* The :class:`~validators.UUID` validator uses the :class:`uuid.UUID`
class instead of a regex. (`#251`_)
* :class:`~fields.SelectField` copies the list of ``choices`` passed
to it so modifying an instance's choices will not modify the global
form definition. (`#286`_)
* Fields call :meth:`~fields.Field.process_formdata` even if the raw
data is empty. (`#280`_)
* Added a :class:`~fields.MultipleFileField` to handle a multi-file
input. :class:`~fields.FileField` continues to handle only one
value. The underlying :class:`~widgets.FileInput` widget gained a
``multiple`` argument. (`#281`_)
* :class:`~fields.SelectField` choices can contain HTML (MarkupSafe
``Markup`` object or equivalent API) and will be rendered properly.
(`#302`_)
* :class:`~fields.TimeField` and
:class:`html5.TimeField <fields.html5.TimeField>` were added.
(`#254`_)
* Improved :class:`~validators.Email`. Note that it is still
unreasonable to validate all emails with a regex and you should
prefer validating by actually sending an email. (`#294`_)
* Widgets render the ``required`` attribute when using a validator
OBS-URL: https://build.opensuse.org/request/show/719613
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WTForms?expand=0&rev=15
88 lines
2.8 KiB
RPMSpec
88 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-WTForms
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-WTForms
|
|
Version: 2.2.1
|
|
Release: 0
|
|
Summary: A flexible forms validation and rendering library for Python web development
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: http://wtforms.simplecodes.com/
|
|
Source: https://files.pythonhosted.org/packages/source/W/WTForms/WTForms-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Recommends: python-Babel
|
|
Recommends: python-Django
|
|
Recommends: python-SQLAlchemy
|
|
Recommends: python-python-dateutil
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module Babel}
|
|
BuildRequires: %{python_module SQLAlchemy}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module python-dateutil}
|
|
# /SECTION
|
|
Provides: python-WTForms-lang
|
|
Obsoletes: python-WTForms-lang
|
|
%python_subpackages
|
|
|
|
%description
|
|
WTForms is a forms validation and rendering library for Python web development.
|
|
With WTForms, form field HTML can be generated and be customized with templates.
|
|
This allows to maintain separation of code and presentation, and keep those parameters out of Python code.
|
|
Because of this loose coupling, any template engine may be used for this.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: Documentation for WTForms
|
|
Group: Documentation/HTML
|
|
Requires: %{name} = %{version}
|
|
|
|
%description -n %{name}-doc
|
|
Documentation for WTForms, which is a forms validation and rendering library for Python web development.
|
|
|
|
%prep
|
|
%setup -q -n WTForms-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
# Fix wrong EOL-encoding
|
|
sed -i "s/\r//" CHANGES.rst
|
|
# remove reference to ../CHANGES.rst
|
|
rm docs/changes.rst
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
pushd tests
|
|
%python_expand $python runtests.py
|
|
popd
|
|
|
|
%files %{python_files}
|
|
%license LICENSE.rst
|
|
%doc AUTHORS.rst CHANGES.rst README.rst
|
|
%{python_sitelib}/*
|
|
|
|
%files -n %{name}-doc
|
|
%doc docs/*.rst
|
|
|
|
%changelog
|