Django-Vcexport.

Django ¸ðµ¨ ÀνºÅϽº ¼öÃâ¾÷ÀÚ
Áö±Ý ´Ù¿î·Îµå

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

±¤°í

  • Rating:
  • ƯÇã:
  • GPL
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Ethan Jucovy

Django-Vcexport. ű×


Django-Vcexport. ¼³¸í

Django ¸ðµ¨ ÀνºÅϽº ¼öÃâ¾÷ÀÚ Django-VCExport´Â Á÷·ÄÈ­ µÈ Django ¸ðµ¨ ÀνºÅϽº¸¦ ÀÚµ¿ ¶Ç´Â ¼öµ¿À¸·Î ¹öÀü Á¦¾î µÈ ÀúÀå¼Ò·Î ³»º¸³»´Â À¯¿¬ÇÑ ¶óÀ̺귯¸®ÀÔ´Ï´Ù. ¿öÅ© ½ºÅ×À̼ÇÀº ÀÀ¿ë ÇÁ·Î±×·¥ ¼öÁØ API¿Í ¸ðµ¨ ¼öÁØ APIÀÔ´Ï´Ù. ¸ðµ¨ ¼öÁØ API´Â ¼öÃâ µ¿ÀÛÀ» Á¤ÀÇÇϱâ À§ÇØ ¸ðµ¨ ¼öÁØ APIÀÔ´Ï´Ù. Save¿¡¼­ ÀÚµ¿ ³»º¸³»±â°¡ÀÖ´Â ¸ðµ¨ Ŭ·¡½º´Â ÀÀ¿ë ÇÁ·Î±×·¥ ¼öÁØ API¸¦ »ç¿ëÇÏ¿© ºä¿¡¼­ ³»º¸³»±â µ¿ÀÛÀ» Á¤ÀÇÇÏ°í ÀÚ½ÅÀÇ Äڵ忡¼­ ÄÜÅÙÃ÷ ³»º¸³»±â¸¦ ¸í½Ã ÀûÀ¸·Î Æ®¸®°ÅÇÕ´Ï´Ù. ¸ðµ¨ ¼öÁØ Apithe µðÀÚÀÎÀº DjangoÀÇ ModelAdmin ¹× ModelForm Aspect- ÁöÇâ ÆÐÅÏ. ÇÙ½É ºñÇìÀ̺ñ¾î´Â modelAdmin°ú À¯»çÇÑ vcexport.models.exporter Ŭ·¡½º¿¡ Á¤Àǵ˴ϴÙ. modeladmin ¹× modelForm°ú ¸¶Âù°¡Áö·Î ¸ðµ¨ ´ç µ¿ÀÛÀ» »ç¿ëÀÚ Á¤ÀÇÇϱâ À§ÇØ ±âº» ±â¹ÝÀ» ÇÏÀ§ Ŭ·¡½ºÇÕ´Ï´Ù. 1. ¸ðµ¨ÀÇ ÀÚµ¿ ¹öÀü °ü¸®¸¦ À§ÇØ vcexport·Î µî·ÏÇϽʽÿÀ. vcexport vceport.register (myModel) °¡Á® ¿À±â post_save ½ÅÈ£¸¦ ¿¬°áÇÕ´Ï´Ù. 2. vcexport.models.exporter¸¦ ¼­ºê Ŭ·¡ ½ÌÇÏ°í ¸ðµ¨º°·Î ¸ðµ¨º°·Î »ç¿ëÀÚ ÁöÁ¤À» »ç¿ëÀÚ ÁöÁ¤ÇÏ°í VCExport¸¦ Class MyExporter (vcexport.models.exporter)¿Í ÇÔ²² µî·ÏÇϵµ·Ï vcexport¸¦ ¾Ë·ÁÁÝ´Ï´Ù. ... vcexport.register ( myModel, Exporter = myExporter) 3. ±âº»ÀûÀ¸·Î ¸ðµ¨Àº diff¿Í Àß ÀÛµ¿ÇϹǷΠdjangoÀÇ XML Çü½ÄÀ¸·Î Á÷·ÄÈ­µÇ¹Ç·Î ÀϹÝÀûÀÔ´Ï´Ù. 4. »ç¿ëÀÚ Á¤ÀÇ ÅÛÇø®Æ® °æ·Î¸¦ Ŭ·¡½º ¼Ó¼ºÀ¸·Î Àü´ÞÇÏ¿© ¸ðµ¨ ´ç Á÷·ÄÈ­¸¦ »ç¿ëÀÚ Á¤ÀÇ ÇÒ ¼ö ÀÖ½À´Ï´Ù. class myExporter (³»º¸³»±â) : Repository_Template = 'Fleem / document_format.txt'ÅÛÇø´Àº µÎ °³ÀÇ ÄÁÅؽºÆ® º¯¼ö·Î ·»´õ¸µµË´Ï´Ù. ÀúÀåµÈ ¸ðµ¨ ÀνºÅϽº ÀÎ BooleanÀº ´ÙÀ½°ú °°½À´Ï´Ù. {%} »õ ¿ÀºêÁ§Æ®! {% endif %} {{object.title}} {{object.related_field.pk}} **** »ö»ó : {{Object.Color}} {{Object.Description}} ÀÌ·¸°ÔÇÏ¸é ´ëü À¯½º ÄÉÀ̽º°¡ Áö¿øµË´Ï´Ù. * ¸ðµ¨À» µµ¸Å * ¸ðµ¨ µµ¸Å * Çϳª ¶Ç´Â µÎ °³ÀÇ ¹®¼­¿Í °°Àº ÅؽºÆ® Çʵ尡ÀÖ´Â ¸ðµ¨ÀÌ ÀÖÀ¸¸ç, ¹öÀüÀÇ ÇÊµå ¸¸ »ç¿ëÇÏ·Á¸é - Á÷·ÄÈ­ ÅÛÇø®Æ®ÀÇ ´Ù¸¥ Çʵ带 ÀÛ¼ºÇÏÁö ¸¶½Ê½Ã¿À. 5. ±âº»ÀûÀ¸·Î ¸ðµ¨ ÀνºÅϽºÀÇ ¹®¼­ ´ýÇÁ´Â / app_name / modelclassname / instance_pkó·³ º¸ÀÌ´Â ÀúÀå¼Ò °æ·Î¿¡ ÀúÀåµË´Ï´Ù. °æ·Î¸¦ »ç¿ëÀÚ Á¤ÀÇ ÇÒ ¼ö ÀÖ½À´Ï´Ù. class myExporter (Exporter) : DEF Repository_Path (Self) : Return '/ my_custom / path_for / this_model /'+ self.Object.Color ÀÌ·¸°ÔÇÏ¸é ¿©·¯ ¸ðµ¨ ÀνºÅϽº¸¦ Á¾·á ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀúÀå¼Ò¿¡¼­ µ¿ÀÏÇÑ ÆÄÀÏ °æ·Î¿¡ ÀúÀåÇϽʽÿÀ. ÀÌ°ÍÀº ±â´ÉÀÔ´Ï´Ù. 6. ±âº» Ä¿¹Ô »ç¿ëÀÚ´Â Á¤ÀǵÇÁö ¾Ê½À´Ï´Ù. ÇöÀçÀÌ ¹®Á¦¸¦ »ç¿ëÀÚ Á¤ÀÇ ÇÒ ¼ö ¾ø½À´Ï´Ù. ±âº» Ä¿¹Ô ¸Þ½ÃÁö´Â {{{@ instance.pk}} ({{{app_name}})ÀÔ´Ï´Ù. {{{{app_name}}.) django-vcexport°¡ ÀúÀåÇß½À´Ï´Ù. " booleanÀ» ÀÛ¼ºÇÑ ¸ðµ¨ ¸Þ¼Òµå·Î Ä¿¹Ô ¸Þ½ÃÁö¸¦ »ç¿ëÀÚ Á¤ÀÇÇÏ°í ¹®ÀÚ¿­ : class myExporter (Exporter) : DEF Repository_commit_message (ÀÚü, »ý¼º) : »ý¼º µÈ °æ¿ì : "»ç¿ëÀÚ % s"»õ·Î¿î % s "% (self.object.user.username, self.object.color) "»ç¿ëÀÚ % s Ä¿¹Ô % s"% (self.object.user.username, self.object.Color) ÀÀ¿ë ÇÁ·Î±×·¥ ¼öÁØ Apiyou´Â ÄÜÅÙÃ÷¸¦ ³»º¸³¾ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î ¸ðµ¨ÀÇ save () ¸Þ¼Òµå, vcexport.export_to_repository ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ¸ðµ¨ÀÇ save () ¸Þ¼Òµå, view save () ¸Þ¼Òµå, etc, view : ... object = mymodel.objects.get (...) object.morx = request.post object.save () import vcexport vcexport.export_to_repository (object) ±âº» ÅÛÇø´, Ä¿¹Ô ¸Þ½ÃÁö µîÀº ¸ðµ¨ API¿Í µ¿ÀÏÇÕ´Ï´Ù. ÀÚ½ÅÀÇ ÄÚµå·Î »ç¿ëÀÚ Á¤ÀÇÇÏ°í export_to_repository : def my_to_repository¿¡ Àü´ÞÇÒ ¼ö ÀÖ½À´Ï´Ù. ... object, created = mymodel.objects.get_or_create (...) object.morx = request.post °³Ã¼ .save () vcexport vceport.export_to_repository (object, created = created, repository_template = '/ fleem / morx.html', message = "morx", repository_path / % s '% object.pk ) export_to_repository ÇÔ¼ö´Â Ä¿¹ÔÀÇ °³Á¤À» ¹ÝȯÇϰųª, commit.confurationyou¸¦ º¯°æÇÏÁö ¾ÊÀº °æ¿ì None. ConconfurationYou´Â ¼³Á¤¿¡ ÇϳªÀÇ ±¸¼ºÀ» Á¦°øÇؾßÇÕ´Ï´Ù. * vcexport_checkout_dir : ÀúÀå¼ÒÀÇ ·ÎÄà üũ ¾Æ¿ô¿¡ ´ëÇÑ Àý´ë °æ·Î µ¥ÀÌÅ͸¦ ÀúÀåÇÏ·Á´Â µ¥ÀÌÅ͸¦ ÀúÀåÇÏ·Á¸é ÀڽŸ¸ÀÇ ÀúÀå¼Ò¿Í üũ ¾Æ¿ôÀ» ÃʱâÈ­ÇؾßÇÕ´Ï´Ù. Subversion°ú ÇÔ²² »ç¿ëÇÏ·Á¸é PYSVNÀÌ ¼³Ä¡µÇ¾î ÀÖ¾î¾ßÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Àå°í ¡¤ ÆÄÀ̽ã ÀÌ ¸±¸®½º¿¡¼­´Â »õ·Î¿î ±â´É : ¡¤ °¥»ö °¡¹æ ¹æÃâ; export_to_repository ÇÔ¼ö¸¦ °ø¿ë API (VCExport.Export_To_Repository)·Î »ç¿ëÇÒ ¼öÀÖ°Ô ¸¸µé¾ú½À´Ï´Ù.


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