當前位置: 首頁>>代碼示例>>Python>>正文


Python Template.post方法代碼示例

本文整理匯總了Python中pyramid.scaffolds.template.Template.post方法的典型用法代碼示例。如果您正苦於以下問題:Python Template.post方法的具體用法?Python Template.post怎麽用?Python Template.post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pyramid.scaffolds.template.Template的用法示例。


在下文中一共展示了Template.post方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
    def post(self, command, output_dir, vars): # pragma: no cover
        """ Overrides :meth:`pyramid.scaffolds.template.Template.post`, to
        print "Welcome to Pyramid.  Sorry for the convenience." after a
        successful scaffolding rendering."""

        if os.path.exists(os.path.join(self.template_dir(), ".gitignore")):
            # .gitignore needs special handling because leading dot
            shutil.copy(os.path.join(self.template_dir(), ".gitignore"), output_dir)

        separator = "=" * 79
        msg = dedent(
            """
            %(separator)s
            Welcome to Websauna. See README.rst for further information.
            %(separator)s
        """ % {'separator': separator})

        self.out(msg)
        return Template.post(self, command, output_dir, vars)
開發者ID:rmoorman,項目名稱:websauna,代碼行數:21,代碼來源:__init__.py

示例2: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
    def post(self, command, output_dir, vars):
        """ Overrides :meth:`pyramid.scaffold.template.Template.post`, to
        print "Welcome to PyCK.  Sorry for the convenience." after a
        successful scaffolding rendering."""

        # Unzip the projectname/scripts/newapp_scaffold.zip
        self.out('\n  Extracting the new app creation templates\n')
        pkg_name = vars['package']

        extract_path = "%s/%s/scripts" % (pkg_name, pkg_name)
        zipfilepath = "%s/newapp_scaffold.zip" % extract_path

        z = zipfile.ZipFile(zipfilepath)
        z.extractall(extract_path)

        os.unlink(zipfilepath)

        self.out('Welcome to PyCK.  Sorry for the convenience :-)')
        return Template.post(self, command, output_dir, vars)
開發者ID:kashifpk,項目名稱:PyCK,代碼行數:21,代碼來源:__init__.py

示例3: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
    def post(self, command, output_dir, vars): # pragma: no cover
        """ Overrides :meth:`pyramid.scaffolds.template.Template.post`, to
        print "Welcome to Pyramid.  Sorry for the convenience." after a
        successful scaffolding rendering."""

        separator = "=" * 79
        msg = dedent(
            """
            %(separator)s
            Tutorials:     http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/
            Documentation: http://docs.pylonsproject.org/projects/pyramid/en/latest/
            Twitter:       https://twitter.com/trypyramid
            Mailing List:  https://groups.google.com/forum/#!forum/pylons-discuss

            Welcome to Pyramid.  Sorry for the convenience.
            %(separator)s
        """ % {'separator': separator})

        self.out(msg)
        return Template.post(self, command, output_dir, vars)
開發者ID:vardhan26,項目名稱:pyramid,代碼行數:22,代碼來源:__init__.py

示例4: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
    def post(self, command, output_dir, vars): # pragma: no cover
        """ Overrides :meth:`pyramid.scaffolds.template.Template.post`, to
        print "Welcome to Pyramid.  Sorry for the convenience." after a
        successful scaffolding rendering."""

        separator = "X" * 79
        msg = dedent("""
        %(separator)s
        Tutorials: http://docs.pylonsproject.org/projects/pyramid_tutorials
        Documentation: http://docs.pylonsproject.org/projects/pyramid
        Twitter (tips & updates): http://twitter.com/pylons
        Mailing List: http://groups.google.com/group/pylons-discuss

        Creator of this scaffold: Mario Idival
        Twitter/Github: @marioidival

        Welcome to Pyramid.  Sorry for the convenience.
        %(separator)s
        """ % {'separator': separator})

        self.out(msg)
        return Template.post(self, command, output_dir, vars)
開發者ID:marioidival,項目名稱:iampharaoh,代碼行數:24,代碼來源:__init__.py

示例5: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
 def post(self, command, output_dir, vars): # pragma: no cover
     """ Overrides :meth:`pyramid.scaffold.template.Template.post`, to
     print "Welcome to Pyramid.  Sorry for the convenience." after a
     successful scaffolding rendering."""
     self.out('Welcome to Pyramid.  Sorry for the convenience.')
     return Template.post(self, command, output_dir, vars)
開發者ID:ChuyuHsu,項目名稱:LittleBeeGeo,代碼行數:8,代碼來源:__init__.py

示例6: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
 def post(self, command, output_dir, vars): # pragma: no cover
     self.out('Welcome to Pyramid.  Sorry for the convenience.')
     return Template.post(self, command, output_dir, vars)
開發者ID:jpcw,項目名稱:pyramid,代碼行數:5,代碼來源:__init__.py

示例7: post

# 需要導入模塊: from pyramid.scaffolds.template import Template [as 別名]
# 或者: from pyramid.scaffolds.template.Template import post [as 別名]
 def post(self, command, output_dir, vars):
     self.out('Welcome to pyramid_appengine.  Go HACK!!!')
     return Template.post(self, command, output_dir, vars)
開發者ID:Rygbee,項目名稱:pyramid_appengine,代碼行數:5,代碼來源:__init__.py


注:本文中的pyramid.scaffolds.template.Template.post方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。