Python论坛  - 讨论区

标题:[python-chinese] 【django】站内消息部分

2007年01月06日 星期六 17:27

风向标 vaneoooo在gmail.com
星期六 一月 6 17:27:51 HKT 2007

ÎÒ¿´µ½django×Ô´øÓÐÒ»¸ö

class Message(models.Model):
    """The message system is a lightweight way to queue messages for given
users. A message is associated with a User instance (so it is only
applicable for registered users). There's no concept of expiration or
timestamps. Messages are created by the Django admin after successful
actions. For example, "The poll Foo was created successfully." is a message.
    """
    user = models.ForeignKey(User)
    message = models.TextField(_('message'))
    def __str__(self):
        return self.message

´óÖ¿´ÁË£¬ÊÇÒ»¸öÇáÁ¿¼¶µÄÏûÏ¢Ìáʾϵͳ£¬Ã²ËƲ»ÊÇͨ³£Ê¹ÓõÄÄÇÖÖÕ¾µãÓû§Ö®¼äÏ໥·¢Ë͵ÄÏûϢϵͳ
²»ÖªµÀdjangoÓÐûÓÐÌṩÄØ£¿
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070106/47777aa3/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号