在SharePoint 2010 母版页里添加自定义用户控件(译) 使用自定义用户控件的好处: 1.容易部署:2.易于控制显示或隐藏. (在使用的过程中)可能要面对的问题是:如何在用户控件里使用Sharepoint 服务器对象模型?可以通过下面代码来实现: using (SPSite site = new SPSite(Request.Url.ToString())) { using (SPWeb web = site.OpenWeb())
向setup.py里添加自定义command 参考这里 继承distutils.cmd.Command类: class CCleanCommand(distutils.cmd.Command): """clean the source code and the .c file after building .so""" # 命令的描述,会出现在`python setup.py --help`里 description = 'clean the s