Àå°í Á¤Á¦

»ç¿ëÀÚ°¡ QuerySetÀ» µ¿ÀûÀ¸·Î ÇÊÅ͸µ ÇÒ ¼öÀÖ°ÔÇÏ´Â Àç»ç¿ë °¡´ÉÇÑ Django ÀÀ¿ë ÇÁ·Î±×·¥
Áö±Ý ´Ù¿î·Îµå

Àå°í Á¤Á¦ ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • BSD License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Jacob Radford
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://github.com/nkryptic/

Àå°í Á¤Á¦ ű×


Àå°í Á¤Á¦ ¼³¸í

Django-Nefinery´Â Django adminÀÇ list_filter ÀÎÅÍÆäÀ̽º¿Í À¯»çÇÑ ¸ðµ¨ÀÇ Çʵ带 ±â¹ÝÀ¸·Î querysetÀ» ÇÊÅ͸µ ÇÒ ¼öÀÖ´Â Django ¾ÛÀÔ´Ï´Ù. FilterTool Helper Ŭ·¡½º°¡ Á¦°øµÇ¸ç (±âº»ÀûÀ¸·Î ±âº»ÀûÀ¸·Î) ¸ðµ¨ Çʵ忡 ÇÊÅ͸µÇÏ°í Á¶È¸ Á¶ÀÛÀ»À§ÇÑ ¾ç½ÄÀ» ¸¸µì´Ï´Ù. ÇïÆÛ Å¬·¡½º´Â Django ModelFormÀ» »ç¿ëÇÏ´Â ¸ðµç »ç¶÷¿¡°Ô Àͼ÷ÇØÁö´Â ÀÎÅÍÆäÀ̽º¸¦ Áö¿øÇÕ´Ï´Ù. example UsageGiven Á¦Ç° ¸ðµ¨À» »ç¿ëÇÏ¿© FilterToolÀ» ¸¸µé ¼ö ÀÖ½À´Ï´Ù : °¡Á® ¿À±â RefineryClass ProductFilterTool (Refinery.FilterTool) : Ŭ·¡½º ¸ÞŸ : ¸ðµ¨ = Á¦Ç° Çʵå = À» ´©¸¥ ´ÙÀ½ ´ç½ÅÀÌ ÇÒ ¼ö ÀÖ½À´Ï´Ù : def product_list (¿äû) : filterTool = ProductFilterTool (request.get ¶Ç´Â none) Render_To_Response ( 'product / product_list.html', { 'filterTool': filterTool) } ¹× ÅÛÇø´¿¡¼­

{{filterTool.Form.as_P}}

Á¦Ç°

    {obj for filterTool %}
  • {{obj.name}} - $ {{obj.price} - $ {{obj.price}}
  • {% endfor %}
      ´õ º¹ÀâÇÑ »ç¿ë ¶Ç´Â »ç¿ëÀÚ Á¤ÀÇ ¿ä±¸ »çÇ× , ÇÁ·ÎÁ§Æ® ¹®¼­¸¦ ÂüÁ¶ÇϽʽÿÀ. installation-pip install -u django-nefinery- install_appsto¿¡ Á¤Á¦Àå Ãß°¡ Django Á¤À¯ °øÀåÀÇ °³¹ß ¹öÀüÀ» ¼³Ä¡ÇÏ°í, PIP ¼³Ä¡ Django-Refinery == dev.productÀÇ homepa Ge.


      Àå°í Á¤Á¦ °ü·Ã ¼ÒÇÁÆ®¿þ¾î