Django-HTMLMin.

HTMLÀº Django¸¦ À§ÇØ Minify.
Áö±Ý ´Ù¿î·Îµå

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

±¤°í

  • Rating:
  • ƯÇã:
  • Other/Proprietary Li...
  • °Ô½ÃÀÚ À̸§:
  • CobraTeam

Django-HTMLMin. ű×


Django-HTMLMin. ¼³¸í

Django¿¡ ´ëÇÑ HTML Minify. Django-HTMLMINÀº Django¿¡ ´ëÇÑ HTML Minify¸¦ Á¦°øÇÏ´Â ÀÀ¿ë ÇÁ·Î±×·¥ÀÔ´Ï´Ù. HTML Äڵ带 ´©ÃâÇϽô °ÍÀº ¹«¾ùÀԴϱî? Ŭ¶óÀ̾ðÆ® Ãø ÃÖÀûÈ­ÀÇ Áß¿äÇÑ Á¡ Áß Çϳª´Â Minified HTML Äڵ带 »ç¿ëÇÏ¿© ¼­¹ö¿¡¼­ Ŭ¶óÀ̾ðÆ®·Î Àü¼Û µÈ µ¥ÀÌÅÍÀÇ Å©±â¸¦ ÁÙÀÌ´Â °ÍÀÔ´Ï´Ù. ÆäÀÌÁö°¡ ´õ »¡¸®·ÎµåµË´Ï´Ù. Django-htmlminÀ» ¼³Ä¡ÇÏ´Â Django-htmlminÀ» ¼³Ä¡ÇϽʽÿÀ. PIP ¼³Ä¡ django-htmlminusing midleWareAllÀº middleware_classes¿¡ htmlmin.middleware.htmlminifymiddleware¸¦ Ãß°¡ÇÕ´Ï´Ù. middleware_classes = (# ´Ù¸¥ ¹Ìµé¿þ¾î Ŭ·¡½ºÀÇ htmlmin) middleware.htmlminifyMiddleware ', django·Î ÀÛµ¿ÇÏÁö ¾Ê´Â html_minify ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© html_minify ÇÔ¼ö¸¦ ¼öµ¿À¸·Î È£Ãâ ÇÒ ¼ö ÀÖ½À´Ï´Ù. htmlmin.minify html_minifyhtml =' hello world ' minified_html = html_minify (html) ¿©±â¿¡ Çöó½ºÅ©º¸±âÀÇ ¿¹ÀÔ´Ï´Ù. Çöó½ºÅ© °¡Á® ¿À±â flaskfrom htmlmin.minify htmlmin.minify html_minifyapp = flask (__ name __) @ app.route ( '/') def home () : rendered_html = render_template ( 'home.html) ') ´äÀå GitHub ResustsPull ¿äûÀÇ GitHub º¸°í¼­ ¹®Á¦¿¡¼­ È£½ºÆà µÈ html_minify (rendered_html) °³¹ß ¼Ò½º¸¦ ¸Å¿ì ȯ¿µÇÕ´Ï´Ù! ÆÐÄ¡°¡ Àß Å×½ºÆ®µÇ¾î ÀÖ´ÂÁö È®ÀÎÇϽʽÿÀ. VirtualEnv¸¦ »ç¿ëÇÏ´Â TestSIF¸¦ ½ÇÇàÇϽʽÿÀ. Å×½ºÆ® ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽㠡¤ Àå°í


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