本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)