Skip to content

Commit 3e84726

Browse files
committed
new release. new block option type. select
1 parent b46ee04 commit 3e84726

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,19 @@ class Slide(models.Model):
250250
as_list = True
251251

252252
options = {
253-
"autoplay": {
254-
"label": "Autoplay slider",
255-
"type": "checkbox",
256-
"default": False
253+
'autoplay': {
254+
'label': 'Autoplay slider',
255+
'type': 'checkbox',
256+
'default': False
257+
},
258+
'width': {
259+
'label': 'Размер слайдера',
260+
'type': 'select',
261+
'default': 'wide',
262+
'options': [
263+
{'value': 'wide', 'name': 'Wide slider'},
264+
{'value': 'narrow', 'name': 'Narrow slider'},
265+
]
257266
}
258267
}
259268

@@ -263,7 +272,7 @@ class Slide(models.Model):
263272
```
264273
In block template you can use this options as `options.autoplay`
265274
In page admin you will see it on the bottom of this block.
266-
> Note: Now only "checkbox" type is working.
275+
> Note: Now only "checkbox" and "select" type is working.
267276
You may apply options for all blocks with `STREAMFIELD_BLOCK_OPTIONS` (See [Settings](#settings))
268277

269278
## Special cases
@@ -342,5 +351,5 @@ STREAMFIELD_BLOCK_OPTIONS = {
342351
```
343352
In block template use `{{ options.margins }}`
344353

345-
> Note: Now only "checkbox" type is working.
354+
> Note: Now only "checkbox" and "select" type is working.
346355

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="django-streamfield",
8-
version="1.1.3",
8+
version="1.1.4",
99
author="Yury Lapshinov",
1010
author_email="y.raagin@gmail.com",
1111
description="StreamField for native Django Admin or with Grappelli",

streamfield/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name = "streamfield"
2-
VERSION = '1.1.3'
2+
VERSION = '1.1.4'

0 commit comments

Comments
 (0)