我对蟒蛇世界比较陌生,但这似乎很直接.
谷歌对我大吼大叫这个代码需要优化:
class AddLinks(webapp.RequestHandler):
def post(self):
# Hash the textarea input to generate pseudo-unique value
hash = md5.new(self.request.get('links')).hexdigest()
# Seperate the input by line
allLinks = self.request.get('links').splitlines()
# For each line in the input, add to the database
for x in allLinks:
newGroup = LinkGrouping()
newGroup.reference = hash
newGroup.link = x
newGroup.put()
# testing vs live
#baseURL = 'http://localhost:8080'
baseURL = 'http://linkabyss.appspot.com'
# Build template parameters
template_values = {
'all_links': allLinks,
'base_url': baseURL,
'reference': hash,
}
# Output the template …Run Code Online (Sandbox Code Playgroud) 在网站安全框架方面,我理解"不要自己动手"的口号.
无论如何,大多数情况下.
我将在一个将文本消息集成到系统中的站点上进行协作.
我想使用现有的,经过良好测试的安全框架来保护用户数据,但我还需要它来保护用户的电话号码.
我不想成为一个负责用户手机号码被劫持和垃圾邮件列表的人.
社区可以提供哪些建议?
背景:我是MegaCorp(tm)的Windows开发人员,我很快就会获得新的硬件.
问题:是否有关于设置开发人员软件安装的最佳实践?
细节:我有我的主IDE(Visual Studio/SQL Management Studio),但也有我正在测试的工具,我不能没有的其他工具,以及未来的住宿.
我的所有代码都存储在SourceSafe中的远程服务器上,所以我不需要真正适应它,但我会经常跳转到perl/python/php进行单独/侧面任务.