Fix some bugs with new CustomFieldRenderer
.
This commit is contained in:
parent
e02357a791
commit
6ac13286cb
|
@ -24,7 +24,7 @@
|
||||||
FormAlchemy Field Renderers
|
FormAlchemy Field Renderers
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .core import DateFieldRenderer
|
from .core import CustomFieldRenderer, DateFieldRenderer
|
||||||
|
|
||||||
from .common import (AutocompleteFieldRenderer,
|
from .common import (AutocompleteFieldRenderer,
|
||||||
DecimalFieldRenderer, CurrencyFieldRenderer,
|
DecimalFieldRenderer, CurrencyFieldRenderer,
|
||||||
|
|
|
@ -44,8 +44,7 @@ class CustomFieldRenderer(formalchemy.FieldRenderer):
|
||||||
if len(args) == 1 and isinstance(args[0], AbstractField):
|
if len(args) == 1 and isinstance(args[0], AbstractField):
|
||||||
super(CustomFieldRenderer, self).__init__(args[0])
|
super(CustomFieldRenderer, self).__init__(args[0])
|
||||||
else:
|
else:
|
||||||
if args:
|
assert len(args) == 0
|
||||||
self.request = args[0]
|
|
||||||
self.init(**kwargs)
|
self.init(**kwargs)
|
||||||
|
|
||||||
def __call__(self, field):
|
def __call__(self, field):
|
||||||
|
|
Loading…
Reference in a new issue