Skip to content

Commit

Permalink
Blocks 0.32.1
Browse files Browse the repository at this point in the history
  • Loading branch information
evgkirov committed Mar 2, 2024
1 parent 6f81c36 commit e4a0d62
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.0.1](https://github.com/uploadcare/pyuploadcare/compare/v5.0.0...v5.0.1) - unreleased

### Changed

- [Blocks](https://github.com/uploadcare/blocks) have been updated to [v0.32.1](https://github.com/uploadcare/blocks/releases)

### Fixed

- The SSL context is now cached by default, resulting in significant performance improvements when initializing the `Uploadcare` class frequently. [#279](https://github.com/uploadcare/pyuploadcare/issues/279)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyuploadcare"
version = "5.0.0"
version = "5.0.1"
description = "Python library for Uploadcare.com"
authors = ["Uploadcare Inc <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pyuploadcare/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# isort: skip_file
__version__ = "5.0.0"
__version__ = "5.0.1"

from pyuploadcare.resources.file import File # noqa: F401
from pyuploadcare.resources.file_group import FileGroup # noqa: F401
Expand Down
2 changes: 1 addition & 1 deletion pyuploadcare/dj/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SettingsType(typing_extensions.TypedDict):
"use_legacy_widget": False,
"use_hosted_assets": True,
"widget": {
"version": "0.30.7",
"version": "0.32.1",
"variant": "regular",
"build": "min",
"options": {},
Expand Down
7 changes: 5 additions & 2 deletions pyuploadcare/dj/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ def widget_attrs(self, widget):
attrs: Dict[str, Any] = {}
if self.legacy_widget:
attrs["data-multiple"] = ""
if not self.required:
attrs["data-clearable"] = ""
else:
attrs["multiple"] = True
if not self.required:
attrs["data-clearable"] = ""
attrs["group-output"] = True
if self.required:
attrs["multiple-min"] = 1
return attrs


Expand Down
5 changes: 3 additions & 2 deletions pyuploadcare/dj/static/uploadcare/blocks.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions pyuploadcare/dj/templates/uploadcare/forms/widgets/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
pubkey="{{ pub_key }}"
{% for k, v in options.items %}
{{ k|escape }}="{{ v|escape }}"{% endfor %}
>
</lr-config>
></lr-config>

<lr-upload-ctx-provider
id="uploaderctx_{{ name }}"
Expand All @@ -38,15 +37,12 @@
<lr-file-uploader-{{ variant }}
css-src="{{ uploadcare_css }}"
ctx-name="{{ name }}"
></lr-file-uploader-{{ variant }}>
>
<lr-form-input
ctx-name="{{ name }}"
></lr-form-input>
</lr-file-uploader-{{ variant }}>

<lr-data-output
ctx-name="{{ name }}"
style="position: absolute;"
use-input
{% if options.multiple == "true" %}use-group{% endif %}
{% if is_required %}input-required{% endif %}
></lr-data-output>

</div>

0 comments on commit e4a0d62

Please sign in to comment.