File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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```
264273In block template you can use this options as `options.autoplay`
265274In 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.
267276You 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```
343352In 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
Original file line number Diff line number Diff line change 55
66setuptools .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" ,
Original file line number Diff line number Diff line change 11name = "streamfield"
2- VERSION = '1.1.3 '
2+ VERSION = '1.1.4 '
You can’t perform that action at this time.
0 commit comments