File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,7 @@ def create_page(
673
673
type = "page" ,
674
674
representation = "storage" ,
675
675
editor = None ,
676
+ full_width = False ,
676
677
):
677
678
"""
678
679
Create page from scratch
@@ -683,6 +684,7 @@ def create_page(
683
684
:param type:
684
685
:param representation: OPTIONAL: either Confluence 'storage' or 'wiki' markup format
685
686
:param editor: OPTIONAL: v2 to be created in the new editor
687
+ :param full_width: DEFAULT: False
686
688
:return:
687
689
"""
688
690
log .info ('Creating {type} "{space}" -> "{title}"' .format (space = space , title = title , type = type ))
@@ -692,11 +694,15 @@ def create_page(
692
694
"title" : title ,
693
695
"space" : {"key" : space },
694
696
"body" : self ._create_body (body , representation ),
697
+ "metadata" : {"properties" : {}},
695
698
}
696
699
if parent_id :
697
700
data ["ancestors" ] = [{"type" : type , "id" : parent_id }]
698
701
if editor is not None and editor in ["v1" , "v2" ]:
699
- data ["metadata" ] = {"properties" : {"editor" : {"value" : editor }}}
702
+ data ["metadata" ]["properties" ]["editor" ] = {"value" : editor }
703
+ if full_width is True :
704
+ data ["metadata" ]["properties" ]["content-appearance-draft" ] = {"value" : "full-width" }
705
+ data ["metadata" ]["properties" ]["content-appearance-published" ] = {"value" : "full-width" }
700
706
try :
701
707
response = self .post (url , data = data )
702
708
except HTTPError as e :
You can’t perform that action at this time.
0 commit comments