新的model能从 uliweb.orm.model 的子类继承而来吗?

3 views
Skip to first unread message

Chunlin Zhang

unread,
Jul 2, 2015, 10:55:50 PM7/2/15
to uli...@googlegroups.com
我这里的model有好几个都有这种需要:
    props = Field(PICKLE)

    def get_prop(self,key):
        props = json_.loads(self.props)
        return props.get(key,None)

    def set_prop(self,key,value):
        props = json_.loads(self.props)
        props[key] = value
        self.props = json_.dumps(props)
所以我想写个子类,然后从这个子类继承

不过记得之前你说过model的类继承好像有问题,还是来问一下看看能不能这么做

limodou

unread,
Jul 6, 2015, 10:32:52 AM7/6/15
to Chunlin Zhang, uliweb
Git中的应该可以

---原始邮件---
发件人: "Chunlin Zhang "<zhangc...@gmail.com>
发送时间: 2015年07月03日 10:55:50
收件人: "uliweb"<uli...@googlegroups.com>;
主题: [uliweb:3504] 新的model能从 uliweb.orm.model 的子类继承而来吗?
--
-- ----
Project : https://github.com/limodou/uliweb
doc : http://limodou.github.com/uliweb-doc
---
You received this message because you are subscribed to the Google Groups "Uliweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uliweb+un...@googlegroups.com.
To post to this group, send email to uli...@googlegroups.com.
Visit this group at http://groups.google.com/group/uliweb.
To view this discussion on the web visit https://groups.google.com/d/msgid/uliweb/8d06d8e9-0361-41da-84d1-5452238982be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages