我创建了一个welcomemsg.cfc
<cfcomponent rest="true" restpath="welcomemsg">
<cffunction name="getMethod" access="remote"
returntype="String" httpmethod="GET">
<cfset var kadal = "Welcome To HelloWorld!">
<cfreturn kadal>
</cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)
我使用"管理员的REST服务"页面注册并映射了CFC文件夹.创建以下index.cfm以使用REST服务:
<cfhttp url="http://localhost:8500/rest/mest/welcomemsg" method="get">
<cfoutput>#cfhttp.filecontent#</cfoutput>
Run Code Online (Sandbox Code Playgroud)
当我运行index.cfm时,结果页面将按预期显示"Welcome to HelloWorld!".但是,当我刷新页面时,会返回一个空白页面.我重新启动了Web浏览器并尝试访问index.cfm.再次返回空白页面.
请帮助.
Dev Env详细信息:
我在我的应用程序中的不同位置发送电子邮件.
msg.send(fail_silently=True)
Run Code Online (Sandbox Code Playgroud)
当发送电子邮件时出错时,有助于避免错误页面显示给最终用户.是否可以捕获此错误以便我创建日志或执行自定义函数?
注意:我正在使用Django 1.10.4和Python 3.5.
我的图像文件夹中有5个jpg图像.我想要一个div来自动逐个改变背景.如何使用jQuery做到这一点?
我可以使用jQuery操作一次background属性,但是当我尝试自动更改和循环时,我被卡住了.
$( document ).ready(function() {
$(".topstrip").css('background-image', 'url("/static/img/website/banner/factory_plane-normal.jpg")')
});
Run Code Online (Sandbox Code Playgroud) 如何获取包含 Django 中所有关联权限列表的组?
我想
group.permissions
Run Code Online (Sandbox Code Playgroud)
给出错误“auth.Permission.None”
但是有分配给该组的权限。