tgext.tagging.

TURBOGEARS2 ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ ÅÂ±× Áö¿ø
Áö±Ý ´Ù¿î·Îµå

tgext.tagging. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • LGPL
  • °Ô½ÃÀÚ À̸§:
  • Alessandro Molina
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://www.objectblues.net/wiki/show/FlatLand

tgext.tagging. ű×


tgext.tagging. ¼³¸í

Turbogears2 ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ Å±ë Áö¿ø tgext.tagingÀº ű׸¦ °ü¸®ÇÏ°í ű׸¦ ÁöÁ¤ÇÏ°í ű׸¦ ÁöÁ¤ÇÒ Å±׸¦ ÁöÁ¤ÇÏ°í Á¦°ÅÇÏ°í endities.installingtgext.taggingÀ» ³ª¿­ÇÏ°í Á¦°ÅÇÏ°í Ãß°¡ ÇÒ ¼öÀÖ´Â ÇÁ·ÎÁ§Æ®¿¡ ű׸¦ ºü¸£°Ô Ãß°¡ ÇÒ ¼öÀÖ´Â turbogears2 ¶óÀ̺귯¸®ÀÔ´Ï´Ù. pypi ¶Ç´Â bitbucket : easy_instalstalst tgext . togingshould togingshould model / __ init__.py ´ÙÀ½ ÇàÀ» Ãß°¡ÇϽʽÿÀ. import tgext.taggingtag, tagging = tgext.tagging.setup_model () ´ëºÎºÐÀÌ ÅÂ±× ÁöÁ¤À» ¼öÇàÇÏ´Â ´ëºÎºÐÀº ÅÂ±× ÁöÁ¤ Ŭ·¡½º¿¡¼­ ³ëÃâµË´Ï´Ù. ³ëÃâ : tag.lookup (tag_name) -> ÁöÁ¤µÈ ÅÂ±× À̸§¿¡ ÅÂ±× ÀνºÅϽº¸¦ ¸®ÅÏÇÕ´Ï´Ù. tag.lookup_list (comma_separrated_tags) -> ÅÂ±× ¸ñ·ÏÀÇ °¢ Ç׸ñ¿¡ ´ëÇÑ ÅÂ±× ÀνºÅϽº¸¦ ¹ÝȯÇÕ´Ï´Ù. tagging.items_for_tags (model, comma_separrated_tags) -> ÁÖ¾îÁø ű׸¦ °¡Áø Ç׸ñ ¸ñ·ÏÀ» ¹ÝȯÇÕ´Ï´Ù. tag_cloud_for_object (item) -> ÁÖ¾îÁø object tagging.tag_cloud_for_set¿¡ ´ëÇÑ ÅÂ±× ¸ñ·Ï (¸ðµ¨, items = none) ->À» ¹ÝȯÇÕ´Ï´Ù. ÁÖ¾îÁø Ç׸ñ ¼¼Æ®¿¡ ´ëÇÑ ÅÂ±× Å¬¶ó¿ìµå. Ç׸ñ ¸ñ·ÏÀÌ Àü´ÞµÇ¸é ÁÖ¾îÁø ¸ñ·ÏÀÇ Å±׸¦ °Ë»öÇϸé ÁÖ¾îÁø ¸ðµ¨ÀÇ ¸ðµç Ç׸ñ¿¡ ´ëÇؼ­´Â º°µµ·Î Ç¥½ÃµË´Ï´Ù. tagging.tag_cloud_for_user (»ç¿ëÀÚ, ¸ðµ¨ = ¾øÀ½) -> ÁÖ¾îÁø »ç¿ëÀÚ°¡ ¼³Á¤ ÇÑ ¸ðµç ű׸¦ ¹ÝȯÇÕ´Ï´Ù. ¸ðµ¨ÀÌ Àü´ÞµÇ¸é ÇØ´ç ¸ðµ¨¿¡ ´ëÇؼ­¸¸ ű׸¦ °Ë»öÇÕ´Ï´Ù. tagging.add_tags (item, comma_separrated_tags) -> item tagging.del_tags (item, comma_separrated_tags) -> item tagging.set_tags (item, comma_separrated_tags) ->¿¡¼­ ÁÖ¾îÁø ű׸¦ Á¦°ÅÇÕ´Ï´Ù. »õ List űױë ControllerText.tagging Ç׸ñÀº ű׸¦ °ü¸®ÇÏ´Â ÄÁÆ®·Ñ·¯¸¦ Á¦°øÇÕ´Ï´Ù. ´ÙÀ½ ÄÚµå·Î ÇÁ·ÎÁ§Æ® ³»¿¡¼­ È°¼ºÈ­ÇϽʽÿÀ. tgext.tagging °¡Á® ¿À±â ÅÂ±× ÁöÁ¤ ControllerClass rootController (baseController) : tagging = taggingController (model = group, session = dbsession, allow_edit = none) ÀÀ¿ë ÇÁ·Î±×·¥¿¡¼­ »ç¿ëÇÒ ¼öÀÖ´Â °¢ ¸ðµ¨¿¡ ´ëÇØ ¿©·¯ taggingController Çϳª¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù ...¿¡ ¸ðµ¨ ¸Å°³ º¯¼ö´Â ¾î¶² ¸ðµ¨ °´Ã¼ ű׸¦ °ü¸® ÇÒ ¸ðµ¨À» ³ªÅ¸³»¸ç, ¼¼¼ÇÀº Äõ¸®¸¦ ¼öÇàÇÏ´Â µ¥ »ç¿ëµÇ´Â SQLALCHEMY ¼¼¼ÇÀÌ°í allow_editÀº repozeÀÔ´Ï´Ù. ÆíÁý ÇÔ¼ö¸¦ Ç¥½ÃÇÏ´ÂÁö È®ÀÎÇÏ´Â µ¥ »ç¿ëµÇ´Â ¿ëµµ°¡ ¹«¾ùÀÎÁö È®ÀÎÇÕ´Ï´Ù. ÄÁÆ®·Ñ·¯´Â ű×, Ãß°¡, Á¦°Å, °Ë»ö Á¶Ä¡¸¦ Á¦°øÇÕ´Ï´Ù. : / tags / id -> jquery.load·Î·Îµå ÇÒ ¼öÀÖ´Â ºÎºÐº¸±â ¾ç½ÄÀÌÀִ ű׸¦ Ãß°¡ / Á¦°ÅÇϴ űװ¡Àִ ű׸¦ Ç¥½ÃÇÕ´Ï´Ù. / add / id? tags = tag1, tag2, tag3 -> it / remove / id¿¡ Çϳª ÀÌ»óÀÇ Å±׸¦ Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï±î? tags = tag1, tag2 -> Ç׸ñ / °Ë»ö¿¡¼­ Çϳª ÀÌ»óÀÇ Å±׸¦ Á¦°ÅÇÏ´Â Çã°¡°¡ ÀÖ½À´Ï±î? ÅÂ±× = TAG1, ÅÂ±× -> ÁÖ¾îÁø ű׸¦ °®´Â Ç׸ñÀ» °Ë»öÇÏ´Â °ÍÀº model.tagging_display ¸Þ¼­µå¸¦ »ç¿ëÇÏ¿© »ç¿ë °¡´ÉÇÑ °æ¿ì °á°ú¸¦ Ç¥½ÃÇÕ´Ï´Ù. ±×·¸Áö ¾ÊÀ¸¸é STR (¸ðµ¨)ÀÌ ¼öÇàµË´Ï´Ù. WIDGETSTGEXT.TAGGING ű׸¦ °ü¸®ÇÏ´Â À§Á¬À» Á¦°øÇÕ´Ï´Ù. tgext.tagging.taglist ¹× tgext.tagging.tagcloud°¡ Á¦°øµË´Ï´Ù. µÎ °¡Áö ¸ðµÎ ű׸¦ °ü¸®Çϱâ À§ÇØ À§Á¬¿¡¼­ »ç¿ëÇÒ ¼öÀִ űë ÄÁÆ®·Ñ·¯ÀÇ URLÀ» °¡¸®Å°´Â ±¸Á¶¿¡¼­ tagging_url ¸Å°³ º¯¼ö¸¦ °¡Á®¿É´Ï´Ù. ±âº»Àû À¸·ÎÀÌ Á¡Àº / űëÇÕ´Ï´Ù. Taglist À§Á¬Àº ¶ÇÇÑ Å±׸¦ Ãß°¡ÇÏ°í Á¦°Å ÇÒ ÄÁÆ®·ÑÀ» ÁöÁ¤ÇÒ ¼öÀÖ´Â EditMode ¸Å°³ º¯¼ö¸¦ ÃëÇÏÁö ¾Ê¾Æ¾ßÇÕ´Ï´Ù. ·»´õ¸µ ÅÂ±× ¸ñ·ÏÀº °´Ã¼¸¦ Àμö·Î °¡Á® ¿Í¼­ ÁÖ¾îÁø °´Ã¼¿¡ ´ëÇÑ ÅÂ±× ¸ñ·ÏÀ» Ç¥½ÃÇÏ°í tagcloud´Â ÅÂ±× Å¬¶ó¿ìµå°¡ ¹Ýȯ µÈ ÅÂ±× Å¬¶ó¿ìµå¸¦ °¡Á®¿É´Ï´Ù. tagging.tag_cloud_for_object, tagging.tag_cloud_for_set ¶Ç´Â tagging.tag_cloud_for_user¸¦ Ç¥½ÃÇÏ°í °¡Áß µÈ ÅÂ±× Å¬¶ó¿ìµå¸¦ Ç¥½ÃÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã


tgext.tagging. °ü·Ã ¼ÒÇÁÆ®¿þ¾î