2008年01月13日 星期日 19:18
如何把auth模块中的User扩展产生上下级关系? 我新建了 一个model是这样写的,老是报错。 from django.contrib.auth.models import User class UserRelation(models.Model): User = models.ForeignKey(User) Superior = models.ForeignKey(User) -- #~~~~ class khsing: def __init__(self): self.name='Gawain Bai' self.blog='http://blog.khsing.net' self.home='Jail' #coding... ...
2008年01月13日 星期日 20:01
¶à¸öFKÖ¸Ïòͬһ¸ö±íÓ¦¸ÃÒªÖƶ¨Ò»¸öÃû×Ö°É On Jan 13, 2008 7:18 PM, Gawain Bai <wike1985在gmail.com> wrote: > ÈçºÎ°ÑauthÄ£¿éÖеÄUserÀ©Õ¹²úÉúÉÏϼ¶¹Øϵ£¿ > > ÎÒн¨ÁË Ò»¸ömodelÊÇÕâÑùдµÄ£¬ÀÏÊDZ¨´í¡£ > from django.contrib.auth.models import User > class UserRelation(models.Model): > User = models.ForeignKey(User) > Superior = models.ForeignKey(User) > > -- > #~~~~ > class khsing: > def __init__(self): > self.name='Gawain Bai' > self.blog='http://blog.khsing.net' > self.home='Jail' > #coding... ... > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20080113/3b39805f/attachment.html
2008年01月13日 星期日 23:28
ÒªÖ¸Ã÷related name On 1/13/08, @@ <askfor在gmail.com> wrote: > > ¶à¸öFKÖ¸Ïòͬһ¸ö±íÓ¦¸ÃÒªÖƶ¨Ò»¸öÃû×Ö°É > > On Jan 13, 2008 7:18 PM, Gawain Bai <wike1985在gmail.com> wrote: > > > ÈçºÎ°ÑauthÄ£¿éÖеÄUserÀ©Õ¹²úÉúÉÏϼ¶¹Øϵ£¿ > > > > ÎÒн¨ÁË Ò»¸ömodelÊÇÕâÑùдµÄ£¬ÀÏÊDZ¨´í¡£ > > from django.contrib.auth.models import User > > class UserRelation(models.Model): > > User = models.ForeignKey(User) > > Superior = models.ForeignKey(User) > > > > -- > > #~~~~ > > class khsing: > > def __init__(self): > > self.name='Gawain Bai' > > self.blog='http://blog.khsing.net' > > self.home='Jail' > > #coding... ... > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20080113/a1d4f80d/attachment.htm
Zeuux © 2024
京ICP备05028076号