Django-form-scaffold.Inbuilt Form.as_P / AS_UL / AS_TABLEÀÇ µ¿Àû DJANGO ÅÛÇø´ Ç¥ÇöÀ» »ý¼ºÇÏ´Â À¯Æ¿¸®Æ¼ ... | |
Áö±Ý ´Ù¿î·Îµå |
Django-form-scaffold. ¼øÀ§ ¹× ¿ä¾à
±¤°í
Django-form-scaffold. ű×
Django-form-scaffold. ¼³¸í
INBUILT FORM.AS_P / AS_UL / AS_TABLE Ãâ·ÂÀÇ µ¿Àû DJANGO ÅÛÇø´À» »ý¼ºÇÏ´Â À¯Æ¿¸®Æ¼ Django-form-scaffold´Â Django ¾ç½Ä ÀνºÅϽº¿¡¼ ¸¶Å© ¾÷À¸·Î Django ÅÛÇø´ Äڵ带 »ý¼ºÇϱâÀ§ÇÑ µµ¿ì¹Ì ±â´ÉÀÇ ÆÐÅ°ÁöÀÔ´Ï´Ù. ´Ù½Ã »ý¼º, as_pÀÇ ÅÛÇø´ ¹öÀüÀÇ ÅÛÇø´ ¹öÀüÀÌ È¿°úÀûÀ¸·Î ¹ß»ýÇÏ´Â Àüü ¾ç½ÄÀÇ ¸¶Å© ¾÷À» ÇØ°áÇÕ´Ï´Ù. as_ul ¹× as_table ¸Þ¼Òµå Ãâ·Â (yanmic django ÅÛÇø´ Äڵ尡 ¾Æ´Ñ Á¤Àû °ª Ãâ·Â) .Django-form-scaffold´Â ÀÌ·¯ÇÑ ¸Þ¼Òµå¿Í µ¿ÀÏÇÑ ¾ç½ÄÀ¸·Î µ¿ÀÏÇÑ ¾ç½ÄÀ¸·Î Ãâ·ÂÇÏÁö¸¸ ¸ðµç ¾ç½Ä ¹× ÇÊµå °ª¿¡ ´ëÇÑ ÅÛÇø´ ÀÚ¸® Ç¥½ÃÀÚ¸¦ »ç¿ëÇÕ´Ï´Ù. Çü½ÄÀÇ ÇʵåÀÇ °³º° Çü½Ä / ½ºÅ¸Àϸµ µîÀ» Á¦¾îÇÏ´Â °ÍÀÌ ´õ ½±°í µðÀÚÀ̳ʰ¡ ¾ç½Ä ÅÛÇø´ ÁÖÀ§¿¡ ¸Ó¸®¸¦ °¡Á® ¿À´Â °ÍÀÌ ÀϹÝÀûÀ¸·Î ½Ã°£°ú ½Ã°£À» ´Ù½Ã ÇÑ ¹ø ´õ ½±°Ô ãÀ» ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î ·Î±×ÀÎ ¾ç½ÄÀ» Ãâ·ÂÇÏ´Â °Í, ´ÙÀ½°ú °°ÀÌ : {{form.as_p}} ¿ì¸®´Â ´ÙÀ½°ú °°½À´Ï´Ù.
{for form.username.errors %} {{error}} {% endfor %} {% endif %} {{form.username.label}} {{form.Username}}
{% form.password ÀÎ °æ¿ì. %} {% Endfor %} {% endif %} {{@ form.password}} {/ p> ¼³Ä¡ : Easy_install (¶Ç´Â PIP)À» »ç¿ëÇÏ¿© Django-form-scaffold¸¦ ¼³Ä¡ÇϽʽÿÀ. ¼³Á¤ ½ºÅ©¸³Æ®¿¡¼ Django-form-scaffoldor¸¦ ¼³Ä¡ÇϽʽÿÀ. Python setup.py installusage : Æû ½ºÄ³ ÆúµùÀº ÄÜÅÙÃ÷¸¦ »ý¼ºÇϱâÀ§ÇÑ °ÍÀ̹ǷΠÅÛÇø´ ÆÄÀÏ¿¡ ¹èÄ¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. Scaffold.as_P°¡ ÅÛÇø´ ÀÚü ³»¿¡¼ È£ÃâµÇÁö ¾Ê½À´Ï´Ù. ½ºÄ³ Æúµå ±â´ÉÀ» È£ÃâÇÏ´Â °¡Àå ÁÁÀº ¹æ¹ýÀº ºÎÆ® ½ºÆ®·¦ Django Python ¼Ð¿¡¼ °ü¸® ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ¿© Python Manage.py ShellThenÀÌ DFS ³×ÀÓ ½ºÆäÀ̽º¿¡¼ ºñ°è¸¦ °¡Á®¿À°í ¾ç½ÄÀ» ÀÛ¼ºÇÏ°í ÀνºÅϽº Áß Çϳª¿¡ ÀνºÅϽº Áß Çϳª¿¡ ÀνºÅϽº¸¦ Àü´ÞÇÕ´Ï´Ù.> >>¿¡¼ myProject.myApp.Forms¿¡¼ scaffold >>>>>>>>> print scaffold.as_p (¾ç½Ä) ) {form.email.errors %} {{ERROR}} {% endf %} {% endif %}
{{form.email.label}} {{form.Email}}
{% IF Form.p assword1.errors %} {{error}} {% endf %} {% endif %}{{form.password1.label}} {{form.password1} }
{%} {{error}} {% endif %} {% endif %} {% Endif %} {% endif %} {% endif %} .label}} {{form.password2}} >> # ¿ì¸®´Â ÀνºÅϽº°¡ ¾Æ´Ñ ¾ç½Ä Ŭ·¡½º¸¦ »ç¿ëÇÒ ¼öµµ ÀÖÁö¸¸ >> # ÀÌ´Â ¾ç½ÄÀÌ ¸Å°³ º¯¼ö µîÀÌ ÇÊ¿äÇϸé Ç×»ó ÀÛµ¿ÇÏÁö ¾Ê½À´Ï´Ù. >>> # ¾î·µç ´ç½ÅÀ»À§ÇÑ ÀνºÅϽº¸¦ ¸¸µì´Ï´Ù. >> Àμâ scaffold.as_ul (cls = myform)½ºÅ¸ÀÏÀ» Ãâ·ÂÇÕ´Ï´Ù. inbuilt django baseform.as_ul.as_tableÀº inbuilt django baseform°ú µ¿ÀÏÇÑ ¸¶Å© ¾÷