[python-chinese] django的tag建表

bird devdoer devdoer在gmail.com
星期一 九月 4 15:13:26 HKT 2006


现在这种方式是通过字符串进行关联,而不是foreign key,本质上应该是一样的,只是具体的实现不同
我现在的体会就是这种方式的耦合更小,可能性能会受到点影响.


在06-9-4,bird devdoer <devdoer at gmail.com> 写道:
>
>
> Tag.objects.all()
> 不知道你说的是不是这个意思
> 性能上没仔细考虑过,但是因为是小项目,问题应该不大
>
>
>  2006/9/4, limodou <limodou at gmail.com>:
>
> > On 9/4/06, bird devdoer <devdoer at gmail.com> wrote:
> > >
> > > 先得到tagName,
> > > 再用
> > > Blog.objects.filter(tags__contais=tagName)
> > > 啊
> > >
> > >
> > 那么再问,如何得到所有blog的tag分类呢?即把所有tag不重复地列出来,如何做呢?
> >
> >
> > --
> > I like python!
> > My Blog: http://www.donews.net/limodou
> > UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad
> > UliPad Maillist: http://groups.google.com/group/ulipad
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
>
> --
> devdoer
> devdoer at gmail.com
> http://project.mytianwang.cn/cgi-bin/blog
>



-- 
devdoer
devdoer at gmail.com
http://project.mytianwang.cn/cgi-bin/blog
-------------- next part --------------
q?????!???,r??m??m????+a?w'???z???_?h?????mi?z{l?m4???????g??f


关于邮件列表 python-chinese 的更多信息