| Django-configurations. Àß ¼³Á¤µÈ ÇÁ·Î±×·¡¹Ö ÆÐÅÏÀ» ÀÇÁöÇÏ¿© Django ÇÁ·ÎÁ§Æ® ¼³Á¤À» ±¸¼ºÇÏ´Â µµ¿ì¹Ì |
Áö±Ý ´Ù¿î·Îµå |
Django-configurations. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Jannis Leidel
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://github.com/jezdez/
Django-configurations. ű×
Django-configurations. ¼³¸í
Django-Configurations´Â ÆÄÀ̽ã Ŭ·¡½ºÀÇ ÇÕ¼º °¡´É¼ºÀ» ÀÇÁöÇÏ¿© Django ÇÁ·ÎÁ§Æ® ±¸¼ºÀ» ¿ÏȽÃÅ°´Â Django ¾ÛÀÔ´Ï´Ù. ±×°ÍÀº Àß ¼³Á¤µÈ °´Ã¼ ÁöÇâ ÇÁ·Î±×·¡¹Ö ÆÐÅÏÀ¸·Î DjangoÀÇ ¸ðµâ ±â¹Ý ¼³Á¤ ·ÎµùÀÇ °³³äÀ» È®ÀåÇÕ´Ï´Ù. QuickStartInstall Django-configurations : PIP ¼³Ä¡ Django-ConfigurationSten ¼ºê Ŭ·¡½º ÇÁ·ÎÁ§Æ®ÀÇ ¼³Á¤. Pating.Py ¶Ç´Â ´Ù¸¥ ¸ðµâ¿¡ Æ÷ÇÔ µÈ ±¸¼º. ¼³Á¤ »ó¼ö¸¦ ÀúÀåÇϽʽÿÀ (¿¹ : ±¸¼º¿¡¼ ±¸¼º °¡Á® ¿À±â SettingsClass MySitesettings (¼³Á¤) : Debug = Trueset DJango_Configuration ȯ°æ º¯¼ö´Â ¹æ±Ý »ý¼º ÇÑ Å¬·¡½ºÀÇ À̸§À¸·Î Bash : DJango_Configuration = MySettingS ¹× Django_Settings_Module ȯ°æ º¯¼ö¸¦ Æò¼Ò¿Í °°ÀÌ ¸ðµâ °¡Á® ¿À±â °æ·Î·Î ¸ðµâ °¡Á® ¿À±â °æ·Î·Î ³»º¸³»½Ê½Ã¿À. bash : export django_settings_module = mysite.settingsto¸¦ »ç¿ëÇÏ¸é ±¸¼ºÀ» »ç¿ëÇϵµ·Ï Django¸¦ È°¼ºÈÇϽʽÿÀ. ÀÌÁ¦´Â ÇØ´ç ½Ãµ¿±â ±â´ÉÀÇ Django-Configurations ¹öÀüÀ» »ç¿ëÇϵµ·Ï Manage.py ¶Ç´Â WSGi.py ½ºÅ©¸³Æ®¸¦ ¼öÁ¤ÇؾßÇÕ´Ï´Ù. Django ±¸¼ºÀ» »ç¿ëÇÏ´Â ÀϹÝÀûÀÎ manage.py´Â ´ÙÀ½°ú °°½À´Ï´Ù. #! / usr / bin / env pythonimport osimport sysif __name__ == "__main__": os.environ.setdefault ( 'django_settings_module', 'mysite.settings') OS. environ.setdefault ( 'django_', 'mysettings) execute_from_command_line execute_from_command_line (sys.argv) ÅëÁö °øÅë µµ±¸ django.core.management.execute_from_command_line ±×·¯³ª ´ë½Å ±¸¼ºÀ» »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. management.execute_from_command_line . ¿¹ : WSGI.py ÆÄÀÏ¿¡µµ µ¿ÀÏÇÕ´Ï´Ù. ¿¹ : osos.environ.setdefault ( 'django_settings_module', 'django_settings_module', 'mysite.settings') os.environ.setdefault ( 'django_configurations', 'django_configurations', 'django_configuration', 'mysettings') get_wsgi_applicationApplication = GET_WSGI_APPLICATION () ¿©±â¿¡¼´Â ±âº» django.core.wsgi.get_wsgi_application ÇÔ¼ö¸¦ »ç¿ëÇÏÁö ¾ÊÁö¸¸ ´ë½Å ±¸¼ºÀ» »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. ÀÌÁ¦ Project.py ¹× ÁÁ¾ÆÇÏ´Â WSGI Áö¿ø Server.ProductÀÇ È¨ÆäÀÌÁö·Î ÇÁ·ÎÁ§Æ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
Django-configurations. °ü·Ã ¼ÒÇÁÆ®¿þ¾î