Àå°í - °£´ÜÇÑ Æò°¡

°£´ÜÇÏ°í È®Àå °¡´ÉÇÑ µî±Þ ½Ã½ºÅÛ
Áö±Ý ´Ù¿î·Îµå

Àå°í - °£´ÜÇÑ Æò°¡ ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • MIT/X Consortium Lic...
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Charles Leifer
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://www.charlesleifer.com/blog/

Àå°í - °£´ÜÇÑ Æò°¡ ű×


Àå°í - °£´ÜÇÑ Æò°¡ ¼³¸í

°£´ÜÇÏ°í È®Àå °¡´ÉÇÑ µî±Þ ½Ã½ºÅÛ Django-Simple-Ratings´Â °£´ÜÇÏ°í È®Àå °¡´ÉÇÑ µî±Þ ½Ã½ºÅÛÀÔ´Ï´Ù. ÀϺΠ¸ðµ¨¿¡ µî±ÞÀ» Ãß°¡Çϱ⸦ ÁÁ¾ÆÇÕ´Ï´Ù. Django.db °¡Á® ¿À±â Modelssfrom Rating.models °¡Á® ¿À±â RatingsClass Food (models.model) : name = models.charfield (max_length) = 50) Ratings = µî±Þ () ÀÌÁ¦´Â ´ÙÀ½À» ¼öÇà ÇÒ ¼ö ÀÖ½À´Ï´Ù. # »ç¹°¿¡ µî±ÞÀ» Ãß°¡ÇϽʽÿÀ >>> Apple.ratings.rate (user = john, score = 1) >>> Apple.ratings .rate (user = jane, score = 5) # Àç¹ÌÀÖ´Â Áý°è µ¥ÀÌÅ͸¦ ¾òÀ¸½Ê½Ã¿À >>> Apple.Ratings.All () GFK, FKS, WAMELTHY ±âº»°ª ()À» ¸ðµ¨¿¡ Ãß°¡ ÇÒ ¶§¸¶´Ù GFK°¡ÀÖ´Â RatedItem ¸ðµ¨À» »ç¿ëÇÕ´Ï´Ù. ´ç½ÅÀÌ ÇÑ °¡Áö¸¸ ÆòÆÇÀ̰ųª ¸í½Ã Àû µ¥ÀÌÅͺ£À̽º Á¦¾à Á¶°ÇÀ» °®Ãß°í ½Í½À´Ï´Ù. GFK ´ë½Å À̸¶ÀÚ Å°°¡ÀÖ´Â »ç¿ëÀÚ Á¤ÀÇ RatedItem ¸ðµ¨À» Á¦°ø ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´ÙÀ½Àº Class Beveragerating (RatedItemBase) : content_object = models.ForeignKey ( 'À½·á') Ŭ·¡½º À½·á (models.model) : name = models.charfield (max_length = 50) Ratings = µî±Þ (BeverageRating) def __unicode __ ( ÀÚü) : extrn self.namethe API´Â Á¤È®È÷ µ¿ÀÏÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽㠡¤ Àå°í


Àå°í - °£´ÜÇÑ Æò°¡ °ü·Ã ¼ÒÇÁÆ®¿þ¾î

errorDocument.

Àº À¥ ÀÀ¿ë ÇÁ·Î±×·¥¿¡¼­ 200 OK ÀÌ¿ÜÀÇ ÀÀ´äÀÌ ¹ÝȯµÇ¸é Çü½ÄÀÌ ÁöÁ¤µÈ HTML ÆäÀÌÁö¸¦ Á¦°øÇÕ´Ï´Ù. ...

132

´Ù¿î·Îµå