Django-web-utils.À¥ ÀÛ¾÷À»À§ÇÑ Django µµ¿ì¹Ì | |
Áö±Ý ´Ù¿î·Îµå |
Django-web-utils. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- BSD License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Aaron Madison
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/madisona/
Django-web-utils. ű×
Django-web-utils. ¼³¸í
Django-Web-utils´Â À¥À» »ç¿ëÇϱâÀ§ÇÑ ¸î °¡Áö µµ¿ì¹Ì¸¦ Á¦°øÇÏ´Â Django ¾ÛÀÔ´Ï´Ù. Format_CurrencyFormats ÅëÈ (USD) ¹®ÀÚ¿¿¡ ÀÖ½À´Ï´Ù. >>> Çö±Ý = 1250 >>> Æ÷¸Ë = format_currency (Çö±Ý) '$ 1,250.00'> >> Formated = format_currency (Çö±Ý, Àå¼Ò = 0) '$ 1,250'>>> Cash = 0 >>> Formatted = format_currency (Çö±Ý, show_zero = false) "format_currency ÅÛÇø´ tagfor django templateTags¸¦ ãÀ» ¼ö ÀÖ½À´Ï´Ù, ´ç½ÅÀº ' llÀº installation_apps ¼³Á¤¿¡ web_utils¸¦ µî·ÏÇØ¾ß {% load formatting_tags %} # °ª, places, show_zero Ç÷¡±×¸¦ ÄÕ´Ï´Ù. {% format_currency cash_amount 0 "false"%} ping_google_sitemapa ½ÅÈ£ ¼ö½ÅÀÚ°¡ Google SiteMapÀ» ÇÎÀ¸·ÎÇÏ¿© ÄÜÅÙÃ÷°¡ º¯°æµÈ °ÍÀ» ¾Ë·ÁÁÝ´Ï´Ù. Settings.py Ping_google_sitemap = true site_domain = 'http : //www.example.com'2¸¦ ¼³Á¤ÇϽʽÿÀ. ¸í¸í µÈ URLÀ» Ãß°¡ÇϽʽÿÀ : 'SiteMap'À̹ǷΠ¸Þ¼µå°¡ SiteMap URL3À» ÇØ°áÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇÎÀ» Æ®¸®°ÅÇÏ·Á´Â ½ÅÈ£¿¡ ¼ö½Å±â¸¦ µî·ÏÇϽʽÿÀ. ¼ö½Å±â (models.signals.post_save, sender = blogentry, dispatch_uid = "blogentry") (ping_google_sitemap) sslmiddlewareallows HTTPS ¶Ç´Â http1À» ÅëÇØ ´Ù¾çÇÑ URLÀ» °Á¦ ½ÇÇàÇÕ´Ï´Ù. ssl_enabled = true¸¦ ¼³Á¤ÇÕ´Ï´Ù. Web_utils.middleware.sslmiddleware¸¦ ¹Ìµé¿þ¾î ¼³Á¤¿¡ Ãß°¡ÇϽʽÿÀ. use_ssl = true / false ¶ó¿ìÆ®ÀÇ View_kwargs URL (r '^ admin /', include (admin.site.urls), kwargs = {use_ssl ': true}), ¸ðµç °æ·Î°¡ http·Î °Á¦µË´Ï´Ù. ƯÁ¤ °æ·Î¸¸À» Á¦¿ÜÇÏ°í´ÂÀ̸¦ Àͽº ¿ü°í ¸ðµç °ÍÀ» ¾ÈÀüÇÏ°Ô ¸¸µå°í ½ÍÁö ¾ÊÀ¸¸é Settings.ProductÀÇ È¨ÆäÀÌÁö¿¡ use_ssl_default = true¸¦ Ãß°¡ÇϽʽÿÀ.
Django-web-utils. °ü·Ã ¼ÒÇÁÆ®¿þ¾î