2007年05月15日 星期二 14:13
ÎÒÏëÔÚlist_displayʱÏÔʾ³öͼƬ£¬¶ø²»Êǵ¥µ¥Í¼Æ¬µÄ·¾¶£¬¿ÉÒÔÂ𣿠¸ÃÔõÑù×ö? -- ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070515/d1d78849/attachment-0001.htm
2007年05月15日 星期二 15:47
def image_tag(self):returnhttp://www.djangoproject.com/documentation/model-api/#list-display On 5/15/07, xiaoyi tian <purpen.w at gmail.com> wrote: > > 我想在list_display时显示出图片,而不是单单图片的路径,可以吗? > > 该怎样做? > > -- > 人生就像一个瓶子,而生活就是瓶子里的水。 > _______________________________________________ > 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 > -- http://codeplayer.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070515/4a60b379/attachment.html
2007年05月15日 星期二 16:03
ÎÒÊÇÕâÑùÉèÖõÄ:
Temp_Pic = models.ImageField('Ä£°åЧ¹ûͼ', default='None.jpg',
upload_to='template_pic')
def display_picture(self):
return '
' % (self.Temp_Pic)
display_picture.show_tags=True
µ«ÏÔʾµÄÊÇ×Ö·û´®
¶ø²»ÊÇͼƬ...
ÔÚ07-5-15£¬»ÆÒã <yi.codeplayer在gmail.com> дµÀ£º
>
> def image_tag(self):return
> image_tag.show_tags=True
>
> http://www.djangoproject.com/documentation/model-api/#list-display
>
>
> On 5/15/07, xiaoyi tian <purpen.w在gmail.com> wrote:
>
> > ÎÒÏëÔÚlist_displayʱÏÔʾ³öͼƬ£¬¶ø²»Êǵ¥µ¥Í¼Æ¬µÄ·¾¶£¬¿ÉÒÔÂð£¿
> >
> > ¸ÃÔõÑù×ö?
> >
> > --
> > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
> > _______________________________________________
> > 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
> >
>
>
>
> --
> http://codeplayer.blogspot.com/
> _______________________________________________
> 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/20070515/e1d5eb8c/attachment.htm
2007年05月15日 星期二 16:34
¶àл£¬½â¾öÁË¡£ ÔÚ07-5-15£¬xiaoyi tian <purpen.w在gmail.com> дµÀ£º > > ÎÒÊÇÕâÑùÉèÖõÄ: > > Temp_Pic = models.ImageField('Ä£°åЧ¹ûͼ', default='None.jpg', > upload_to='template_pic') > > def display_picture(self): > return '' % ( > self.Temp_Pic) > display_picture.show_tags=True > > µ«ÏÔʾµÄÊÇ×Ö·û´® >
> height="80" /> > ¶ø²»ÊÇͼƬ... > > > ÔÚ07-5-15£¬»ÆÒã <yi.codeplayer在gmail.com> дµÀ£º > > > > def image_tag(self):return
> > image_tag.show_tags=True > > > > http://www.djangoproject.com/documentation/model-api/#list-display > > > > > > On 5/15/07, xiaoyi tian < purpen.w在gmail.com> wrote: > > > > > ÎÒÏëÔÚlist_displayʱÏÔʾ³öͼƬ£¬¶ø²»Êǵ¥µ¥Í¼Æ¬µÄ·¾¶£¬¿ÉÒÔÂ𣿠> > > > > > ¸ÃÔõÑù×ö? > > > > > > -- > > > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ > > > _______________________________________________ > > > 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 > > > > > > > > > > > -- > > http://codeplayer.blogspot.com/ > > _______________________________________________ > > 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/20070515/c84820a1/attachment-0001.html
2007年05月15日 星期二 16:40
²»¹ý²»ÊÇshow_tags¶øÊÇallow_tags. ÔÚ07-5-15£¬xiaoyi tian <purpen.w在gmail.com> дµÀ£º > > ¶àл£¬½â¾öÁË¡£ > > ÔÚ07-5-15£¬xiaoyi tian <purpen.w在gmail.com> дµÀ£º > > > > ÎÒÊÇÕâÑùÉèÖõÄ: > > > > Temp_Pic = models.ImageField('Ä£°åЧ¹ûͼ', default='None.jpg', > > upload_to='template_pic') > > > > def display_picture(self): > > return '' % ( > > self.Temp_Pic) > > display_picture.show_tags=True > > > > µ«ÏÔʾµÄÊÇ×Ö·û´® > >
> > width="100", height="80" /> > > ¶ø²»ÊÇͼƬ... > > > > > > ÔÚ07-5-15£¬»ÆÒã <yi.codeplayer在gmail.com> дµÀ£º > > > > > > def image_tag(self):return
> > > image_tag.show_tags=True > > > > > > http://www.djangoproject.com/documentation/model-api/#list-display > > > > > > > > > On 5/15/07, xiaoyi tian < purpen.w在gmail.com> wrote: > > > > > > > ÎÒÏëÔÚlist_displayʱÏÔʾ³öͼƬ£¬¶ø²»Êǵ¥µ¥Í¼Æ¬µÄ·¾¶£¬¿ÉÒÔÂ𣿠> > > > > > > > ¸ÃÔõÑù×ö? > > > > > > > > -- > > > > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£ > > > > _______________________________________________ > > > > 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 > > > > > > > > > > > > > > > > -- > > > http://codeplayer.blogspot.com/ > > > _______________________________________________ > > > 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/20070515/0c7ed776/attachment.htm
Zeuux © 2025
京ICP备05028076号