2007年01月06日 星期六 17:27
ÎÒ¿´µ½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
Zeuux © 2025
京ICP备05028076号