当前位置: 首页>>代码示例>>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;未经允许,请勿转载。