Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
28c140c5
Commit
28c140c5
authored
Nov 18, 2019
by
iCaiCai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove *args
parent
2a3110d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
rules.py
flask_admin/form/rules.py
+1
-15
No files found.
flask_admin/form/rules.py
View file @
28c140c5
...
@@ -377,29 +377,15 @@ class Row(NestedRule):
...
@@ -377,29 +377,15 @@ class Row(NestedRule):
class
Group
(
Macro
):
class
Group
(
Macro
):
def
__init__
(
self
,
field_name
,
*
args
,
prepend
=
None
,
append
=
None
,
**
kwargs
):
def
__init__
(
self
,
field_name
,
prepend
=
None
,
append
=
None
,
**
kwargs
):
'''
'''
Bootstrap Input group.
Bootstrap Input group.
'''
'''
render_field
=
kwargs
.
get
(
'render_field'
,
'lib.render_field'
)
render_field
=
kwargs
.
get
(
'render_field'
,
'lib.render_field'
)
super
(
Group
,
self
)
.
__init__
(
render_field
)
super
(
Group
,
self
)
.
__init__
(
render_field
)
self
.
field_name
=
field_name
self
.
field_name
=
field_name
self
.
_addons
=
[]
self
.
_addons
=
[]
for
cnf
in
args
:
if
isinstance
(
cnf
,
str
):
self
.
_addons
.
append
({
'pos'
:
'append'
,
'type'
:
'text'
,
'text'
:
cnf
})
continue
if
cnf
[
'type'
]
in
(
'field'
,
'html'
,
'text'
):
cnf
.
setdefault
(
'pos'
,
'append'
)
self
.
_addons
.
append
(
cnf
)
if
prepend
:
if
prepend
:
if
not
isinstance
(
prepend
,
(
tuple
,
list
)):
if
not
isinstance
(
prepend
,
(
tuple
,
list
)):
prepend
=
[
prepend
]
prepend
=
[
prepend
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment