コード例 #1
0
    def __init__(self, form, model, prop, **kwargs):
        self.form = form
        self.model = model
        self.prop = prop

        self._pk = get_primary_key(model)

        super(InlineModelFormList, self).__init__(InlineModelFormField(form, self._pk), **kwargs)
コード例 #2
0
ファイル: fields.py プロジェクト: martyanov/flask-admin
    def __init__(self, form, session, model, prop, **kwargs):
        """
            Default constructor.

            :param form:
                Form for the related model
            :param session:
                SQLAlchemy session
            :param model:
                Related model
            :param prop:
                Related property name
        """
        self.form = form
        self.session = session
        self.model = model
        self.prop = prop

        self._pk = get_primary_key(model)

        super(InlineModelFormList,
              self).__init__(InlineModelFormField(form, self._pk), **kwargs)