Django-admin-decorators.

Django °ü¸®ÀÚ¸¦À§ÇÑ ¿©ºÐÀÇ Àå½Ä ÀÚ
Áö±Ý ´Ù¿î·Îµå

Django-admin-decorators. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • MIT/X Consortium Lic...
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Mikhail Korobov
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://bitbucket.org/kmike/

Django-admin-decorators. ű×


Django-admin-decorators. ¼³¸í

DjangoÀÇ °ü¸®ÀÚ´Â list_display ¹× ReadOnly_Field¿¡ ´ëÇÑ È£ÃâÀ» Çã¿ëÇÕ´Ï´Ù. ÀÌ·¯ÇÑ È£Ãâ ÀåÄ¡¸¦ »ç¿ëÀÚ Á¤ÀÇÇϱâ À§ÇØ (¿¹¸¦ µé¾î ¼³¸íÇÑ ¼³¸í) Django´Â °³¹ßÀÚ°¡ È£Ãâ °¡´ÉÇÑ (¿¹ : e. short_description ')¿¡ ¼Ó¼ºÀ» ¼³Á¤ÇؾßÇÕ´Ï´Ù. Django-admin-decorators´Â °£´ÜÇÑ Á¢±Ù ¹æ½ÄÀ̸ç ÀÛµ¿ÇÕ´Ï´Ù. ±×·¯³ª ¿ÀŸ¸¦ ¸¸µé°Å³ª ÀÚµ¿ ¿Ï¼ºÀÌ ¾ø±â ¶§¹®¿¡ ½±°Ô ÀÔ·Â ÇؾßÇÏ´Â ¼Ó¼ºÀ» ÀØ¾î ¹ö¸®°Å³ª ¾ÛÀ» Á¦°øÇÕ´Ï´Ù. Django admin.installationPIP »ç¿ëÀÚ Á¤ÀÇ¿¡ À¯¿ëÇÑ ´Ù¸¥ µ¥ÄÚ·¹ÀÌÅÍ ¼³Ä¡ Django-admin-decoratorsageFrom django.contrib °¡Á® ¿À±â adminfrom admin_decorators myApp.models °¡Á® ¿À±â myApp.models myModelAdmin (admin.modeladmin) °¡Á® ¿À±â : list_display = 'name', '_text', 'has_huge_text', 'html_text', 'html_url'readonly_fields = [ 'name', 'html_url'@short_description ( 'ÅؽºÆ®´Â 100 chars·Î Á¦ÇÑ') @Order_Field ( 'text') @limit_width (100) DEF _TEXT (ÀÚü, obj) : obj.text @boolean @short_description ( 'ÅؽºÆ®´Â °Å´ëÇÑ') DEF has_huge_text (self, obj) : ¸®ÅÏ len (obj.text)> 100 @short_description ( '¸µÅ©' ) @Order_Field ( 'URL') @Ally_Tags @Apply_tags ( 'URLize') DEF html_url (s elf, obj) : obj.urladmin.site.register (mymodel, myModelAdmin) return_tags decorator´Â list_display ¹× readonly_fields.Take¿¡¼­ htmlÀÌ µÉ °ÍÀ̹ǷΠ´õ ¸¹Àº decorators.DevelopmentDevelopment°¡ ¹ß»ýÇÑ ¼Ò½º Äڵ带 º¼ ¼ö ÀÖ½À´Ï´Ù. Bitbucket and Github. ´ç½ÅÀÌ ¹ö±×¸¦ ¹ß°ßÇ߰ųª »õ·Î¿î µ¥ÄÚ·¹ÀÌÅÍ¿¡ ´ëÇÑ ¾ÆÀ̵ð¾î°¡ Àְųª ƼÄÏÀ» ¿­°í ´ç±è ¿äûÀ» º¸³» Áֽñ⠹ٶø´Ï´Ù. Á¦Ç°ÀÇ È¨ÆäÀÌÁö


Django-admin-decorators. °ü·Ã ¼ÒÇÁÆ®¿þ¾î