删除主干PUT上的确认框和对Firefox上的django api的DELETE请求(Remove Confirmation box on backbone PUT and DELETE request to django api on firefox)
当PUT或DELETE请求从骨干到django rest api时,Firefox显示一个确认框,而没有要求POST请求的确认。
此网页正被重定向到新位置。 是否要将您输入的表单数据重新发送到新位置?
在铬没有这样的确认框即将到来。
有没有办法删除这个盒子? 它的原因是什么?
Firefox is showing a confirmation box when a PUT or DELETE request is going from backbone to django rest api, whereas no such confirmation being asked for POST request.
This web page is being redirected to a new location. Would you like to resend the form data you have typed to the new location?
In chrome no such confirmation box coming.
Is there any way to remove this box? what would be the reason for it?
原文:https://stackoverflow.com/questions/21252345
最满意答案
<% provider = "Google" if provider == "GoogleOauth2" %>
这只会修改
provider
的价值,如果它是GoogleOauth2
编辑:
根据评论,你需要的是另一个变量来“显示”所显示的文本,但保留
link_to
助手的原始值,所以这是我会做的:<%= pretty_provider = provider == 'GoogleOauth2' ? "Google": provider %> <%= link_to "#{OmniAuth::Utils.camelize(pretty_provider)},", omniauth_authorize_path(resource_name, provider), class: "#{pretty_provider} bold" %>
<% provider = "Google" if provider == "GoogleOauth2" %>
This will only modify the value of
provider
if it isGoogleOauth2
Edit:
Based on comments, what you need is another variable to "prettyfy" the text shown, but keep the original value to the the
link_to
helper, so this is what I would do:<%= pretty_provider = provider == 'GoogleOauth2' ? "Google": provider %> <%= link_to "#{OmniAuth::Utils.camelize(pretty_provider)},", omniauth_authorize_path(resource_name, provider), class: "#{pretty_provider} bold" %>
相关问答
更多-
PACT - 使用提供者状态(PACT - Using provider state)[2021-10-15]
状态更改URL是您在提供程序上创建的挂钩,以允许Pact告知提供程序在测试开始时应该处于什么状态。 在每次测试运行之前,模拟消费者会在提供程序上点击状态更改URL,并告诉它测试期望的状态名称。 你需要做两件事: 配置状态更改URL 在提供程序上实现状态更改端点 配置状态更改URL 您可以在提供程序验证设置中配置状态更改URL。 例如,使用maven插件 :provider1 http://localhos ... -
问题是configuration/entityFramework/providers部分为异常中指定的不变量提供了重复的提供者。
即使您只指定了一个,但可能发生的情况是在父目录的.config文件中指定了一个。 由于.config文件继承了父 ... -
Http是多余的 providers: [FrameService, Http, { provide: $WINDOW, useValue: window }], 因为HttpModule在 imports: [HttpModule, BrowserModule, FormsModule], 已经提供了 Http is redundant in providers: [FrameService, Http, { provide: $WINDOW, useValue: window }], beca ...
-
您可以使用Google Play开发者控制台轻松更新开发者名称: 登录到您的Google Play开发者控制台 。 单击设置 。 在“开发者名称”旁边,键入要在Google Play上显示的开发者名称。 在屏幕顶部附近,点击保存 。 参考: https : //support.google.com/googleplay/android-developer/answer/139626 You can easily update your developer name using the Google Play ...
-
错误与角提供者(error with angular provider)[2024-04-19]
这不是一个角度问题。 检查s3桶的CORS配置。 CORS文件 This is not an angular problem. Check out CORS configuration of your s3 bucket. CORS documentation -
如何更改提供者的名称(how to change the provider's name)[2023-10-03]
<% provider = "Google" if provider == "GoogleOauth2" %> 这只会修改provider的价值,如果它是GoogleOauth2 编辑: 根据评论,你需要的是另一个变量来“显示”所显示的文本,但保留link_to助手的原始值,所以这是我会做的: <%= pretty_provider = provider == 'GoogleOauth2' ? "Google": provider %> <%= link_to "#{OmniAuth::Utils.ca ... -
如何在Apple商店中更改应用的提供商名称?(How I can change the provider name of an app in the apple store? [duplicate])[2022-10-08]
如果您想更改卖家名称,那么 - 在当前的联系页面上, 合同和法律类别包括请求名称/地址更新 。 试试吧。 有关详细信息 - 请参阅此内容 If you want to change the Seller name then - On the current Contact page, the Contracts and Legal category includes Request Name/Address update. Try that. For more info - See this -
您可以使用Icon属性。 请参阅: http : //msdn.microsoft.com/en-us/library/system.windows.forms.errorprovider.icon(v = vs。90).aspx 一个简单的谷歌搜索提供结果https://www.google.co.in/search?q=errorprovider+icon There is an Icon property you can use. See: http://msdn.microsoft.com/en-u ...
-
WebSecurity助手类设计用于ExtendedMembershipProvider类(SimpleMembershipProvider等基于此类)。 如果您基于提供程序并且您的站点配置为使用基于ExtendedMembership的提供程序,则建议的方法是使用WebSecurity(尽管它仅公开底层提供程序接口能够的子集。 如果您的提供程序基于原始.NET MembershipProvider并且您的站点已相应配置,则您将直接处理提供程序:通常是Membership和Role类。 本文概述了不同提供商 ...
-
Java泛型帮助了我。 解: public class SuperClass { // Constructor @Inject SuperClass(Provider extends SuperClass.Parameters> superParam) { } public class Parameters { int a; } } public class Sub extends SuperClass { @Inject Sub(Provider
相关文章
更多- vicalloy的我与django
- HttpClient DELETE请求示例
- Backbone.js的技巧和模式
- HttpClient PUT请求示例
- Django资源汇总(转)
- Haystack - Search for Django
- solr delete query
- Memcached delete 删除key
- 最近遇到一个Ext.Ajax.request的奇怪问题
- django后台实现微信公众平台网址接入
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)