Django-Dynamicsites - Lite.

´ÜÀÏ Django ÇÁ·ÎÁ§Æ®¿¡¼­ ¿©·¯ »çÀÌÆ® È£½ºÆ®
Áö±Ý ´Ù¿î·Îµå

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

±¤°í

  • Rating:
  • ƯÇã:
  • Other/Proprietary Li...
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Ian Ward
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://excess.org/templayer/

Django-Dynamicsites - Lite. ű×


Django-Dynamicsites - Lite. ¼³¸í

Django-dynamicsites-Lite´Â Ç¥ÁØ Django.contrib.sites ÆÐÅ°Áö¸¦ È®ÀåÇÏ´Â Django ¾ÛÀ¸·Î ´ÙÀ½À» Çã¿ë ÇÒ ¼öÀÖ´Â »çÀÌÆ® À¥ ¼­¹ö ·¹º§ - 301¿¡¼­ ¿©·¯ °¡»ó È£½ºÆ®¿¡ ´ëÇÑ ¿©·¯ °¡»ó È£½ºÆ®¿¡ ´ëÇÑ ÇÊ¿ä ¾øÀ½À» Åë°úÇÏ´Â »çÀÌÆ® - »çÀÌÆ®¿¡´Â ÀÚü URLS.PY ¹× ÅÛÇø´ÀÌÀÖÀ» ¼ö ÀÖ½À´Ï´Ù. ȯ°æ È£½ºÆ® À̸§ ¸ÅÇÎ (DEV, ½ºÅ×ÀÌ¡, Å×½ºÆ® µî ȯ°æ¿¡¼­ »ç¿ëÇϱâ À§ÇØ) ±¸¼ºÀ» »ç¿ëÇϴ ȯ°æ È£½ºÆ® À̸§ ¸ÅÇÎÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ±¸¼ºÀ» ¼³Ä¡Çϱâ Àü¿¡ Àû¾îµµ 1 Admin PanelÀÇ »çÀÌÆ®´Â DynamicSites°¡ ¼³Ä¡µÇ¸é request.get_host ()¿¡¼­ »çÀÌÆ®¸¦ Á¶È¸ÇÏ·Á°í ½ÃµµÇÏ°í Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì Ç×»ó 4041À» ´øÁ³½À´Ï´Ù. installed_apps installed_apps = (... ')¿¡ ¾ÛÀ» Ãß°¡ÇÕ´Ï´Ù. DynamicSitesLite ',) 2. ¹Ìµé¿þ¾î¸¦ middleware_classes¿¡ Ãß°¡ middleware_classes = (... 'dynamicsiteslite.middleware.dynamicesitesmiddleware') 3. Context ÇÁ·Î¼¼¼­¸¦ Template_context_Processors ÅÛÇø´ _Context_Processors = (... 'DynamicSitesLite.Context_Processors.Current_site')¿¡ Ãß°¡ÇϽʽÿÀ. 4. sites_dir, sites_package, default_host ¹× hostname_redirects¿¡ settings_dir, sites_package, default_pate.join (os.path.dirname (__ ÆÄÀÏ __), '»çÀÌÆ®') sites_package = 'sesse'default_host = 'www.your-default -site.com 'hostname_redirects = {#'redirect-src-1.com ':'www.redirect-dest-1.com ', ...} 5. Áö¿ª ȯ°æ (¿¹ : Å×½ºÆ®, Dev, STAGing)ÀÌ »ý»êº¸´Ù ´Ù¸¥ È£½ºÆ® À̸§À» »ç¿ëÇÏ´Â °æ¿ì env_hostnames ¸ÊÀ» Àß ¼³Á¤ÇϽʽÿÀ. env_hostnames = { 'my-site.dev': 'www.your-devault-site.com', .. .} 6. »çÀÌÆ® µð·ºÅÍ (À§ÀÇ site_dir ¼³Á¤¿¡¼­)¸¦ ¸¸µé°í __init__.py ÆÄÀÏÀ» inside7À» ³ÖÀ¸½Ê½Ã¿À. È£½ºÆÃÁßÀÎ °¢ »çÀÌÆ®¿¡ ´ëÇÑ »çÀÌÆ® DirÀ» ¸¸µå½Ê½Ã¿À (¿¹ : mkdir »çÀÌÆ® / www_mysitesdomain_com) Á¦Ç°ÀÇ È¨ÆäÀÌÁö


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