Àå°í ÀÇÁ¸¼º¿ÜºÎ Á¾¼Ó¼ºÀ» °ü¸®ÇÏ´Â µ¥ µµ¿òÀ̵Ǵ Django ¾Û | |
Áö±Ý ´Ù¿î·Îµå |
Àå°í ÀÇÁ¸¼º ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- BSD License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Caktus Consulting Group
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://caktusgroup.com
Àå°í ÀÇÁ¸¼º ű×
Àå°í ÀÇÁ¸¼º ¼³¸í
Django ¾ÛÀº ¿ÜºÎ Á¾¼Ó¼ºÀ» °ü¸®ÇÏ´Â µ¥ µµ¿òÀ̵˴ϴ٠Django-dependency´Â ¸ðµç ¹öÀü Á¦¾î ½Ã½ºÅÛÀ» ÅëÇØ È£½ºÆõǴ ¿ÜºÎ Á¾¼Ó¼ºÀ» °ü¸®ÇÏ´Â Django ¾ÛÀÔ´Ï´Ù. ¼³Ä¡ : 1. ¾Û ´Ù¿î·Îµå´Â ÆÄÀ̽㠰æ·Î¿¡ Ãß°¡ÇÕ´Ï´Ù. hg clone https://django-dependency.googlecode.com/hg/ django-dependency cd django-dependency python setup.py install2. install_apps : insteduct_apps = (# ... 'deps',) setupadd ¼³Á¤ ÆÄÀÏ¿¡ ´ëÇÑ Á¾¼Ó¼º * svn : ¿ÜºÎ¿¡¼ ¸¶À̱׷¹À̼ÇÇÏ´Â °æ¿ì, Á¾¼Ó¼º ¸ñ·ÏÀ» ÀÚµ¿À¸·Î »ý¼ºÇÏ´Â µ¥ »ç¿ëÇÒ ¼öÀÖ´Â ½ºÅ©¸³Æ®°¡ ÀÖ½À´Ï´Ù. ´ÙÀ½ ¸í·ÉÀ» ½ÇÇàÇÏ°í, Ãâ·ÂÀ» ¼³Á¤ ÆÄÀÏ¿¡ º¹»ç / ºÙ¿© ³ÖÀ¸½Ê½Ã¿À. installation_apps°¡ ÃֽŠ»óÅÂÀÎÁö È®ÀÎÇϽʽÿÀ. create_deps.py apps / external_apps libs / external_libs * svn¿¡¼ ¸¶À̱׷¹À̼ÇÇÏÁö ¾Ê´Â °æ¿ì : ¿ÜºÎ¿¡¼ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. Á¾¼Ó¼º ¹× installated_apps ÀÌ¿Í °°ÀÌ ¼öµ¿À¸·Î : OS °¡Á® ¿À±â deps # ... project_path = os.path.abspath ( '% s / .. % path.dirname (__ file__)) # ... depdendency_root = os.path.join ( project_path, '¿ÜºÎ') Á¾¼Ó¼º = (# subversion deps.svn (#uncment to Revision to Revision to Revision to Revision 22 # rev = 22, 'http://code.djangoproject.com/svn/django/trunk/django', root = depdendency_root ), # mercurial deps.hg (#uncment to revision 8ed91139be12 # rev = '8ed91139be12', 'http://bitbucket.org/jezdez/django-robots/', app_name = '·Îº¿', root = depdendency_root, ), # gitÀº ¸Ó¸® ¶Ç´Â ´Ù¸¥ ű׸¦ »ç¿ëÇÏ¿© sha1 ID¿¡ °íÁ¤µÇ¾î Çìµå ¶Ç´Â ´Ù¸¥ ű׸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù .Git ( 'git : //github.com/howiworkdaily/django-faq.git', app_name = 'faq', project_name = 'django- FAQ ', ·çÆ® = DEPDENDENCY_ROOT, REV ='85A23E71BA23D4F C5CD92D81A02C1B90731A02C1B9073161A21 ',),) # ... install_apps = (# ...'·Îº¿ ', ¾÷µ¥ÀÌÆ® manage.py * ÆÄÀ̽㠰æ·Î¿¡ Á¾¼Ó¼ºÀ» µ¿ÀûÀ¸·Î Ãß°¡ÇÏ°í ¼³Á¤À» °¡Á®¿Â ÈÄ¿¡µµÀÌ Äڵ带 Ãß°¡ÇÏÁö¸¸ °¡Á® ¿À±â Àü¿¡ÀÌ Äڵ带 Ãß°¡ÇϽʽÿÀ. Django : Deps Deps.add_all_To_Path °¡Á® ¿À±â (projectName.Settings, Auto_Update = sys.argv = 'up') * ¿¹¸¦ µé¾î Àüü manage.py´Â ´ÙÀ½°ú °°½À´Ï´Ù. #! / usr / bin / env ÆÄÀ̽㠰¡Á® ¿À±â sys °¡Á® ¿À±â os.path °¡Á® ¿À±â deps # remove '.' °æ·Î¿¡¼ (¿©±â¿¡¼ ÇÁ·ÎÁ§Æ® ÆÐÅ°Áö¸¦ »ç¿ëÇؾßÇÕ´Ï´Ù) sys.path.pop (0) project_root = os.path.abspath (os.path.dirname (__ ÆÄÀÏ __)) sys.path.insert (0, os.path.dirname (project_root)) ½Ãµµ : importError¸¦ Á¦¿ÜÇÑ projectname.settings °¡Á® ¿À±â : import sys sys.stderr.write ( "¿À·ù : % rÀÌ Æ÷ÇÔ µÈ µð·ºÅ丮¿¡¼ 'settings.py ÆÄÀÏÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù. \ »ç¿ëÀÚ Á¤ÀǸ¦ »ç¿ëÀÚ Á¤ÀÇÇß½À´Ï´Ù. \ n django-admin.py¸¦ ½ÇÇàÇؾßÇÕ´Ï´Ù. ¼³Á¤ ¸ðµâÀ» Àü´ÞÇÕ´Ï´Ù. \ n (ÆÄÀÏ ¼³Á¤ÀÌ ½ÇÁ¦·Î Á¸ÀçÇÏ´Â °æ¿ì, ImportError°¡ ¾î¶»°Ô µç, ±×°ÍÀº ¾î¶»°Ô µç "% __file__ÀÔ´Ï´Ù. ) sys.exit (1) Len (sys.argv)> 1 ¹× sys.argv == 'up': deps.add_all_to_path (projectname.settings, auto_update = true) else : deps.add_all_path (projectname.settings) , auto_update = false¿¡¼ django.core.management °¡Á® ¿À±â execute_manager "__name__ =="__main__ ": execute_manager (projectname.settings) * ÀÌÁ¦"./manage.py up "À» ½ÇÇàÇÏ¿© Á¾¼Ó¼ºÀ» ÀâÀ¸·Á°íÇÕ´Ï´Ù! Caktus ÄÁ¼³ÆÃÀÌ ÈÄ¿øÇÏ´Â °³¹ß ±×·ì, LLC. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
Àå°í ÀÇÁ¸¼º °ü·Ã ¼ÒÇÁÆ®¿þ¾î