我正在将summernote-rails https://github.com/summernote/summernote-rails添加到项目中。我按照自述文件:安装了宝石:
gem 'summernote-rails', 'current version number'
gem 'bootstrap-sass' # required
我的application.scss:
*= require_tree .
*= require_self
*/
@import "bootstrap-sprockets";
@import "bootstrap";
@import "summernote";
的application.js:
//= require jquery
//= require jquery_ujs
//= require rails-ujs
//= require turbolinks
//= require_tree .
//= require bootstrap
//= require summernote
我已将帖子添加到posts / edit.html.erb:
<script type="text/javascript">
$(document).ready(function() {
$('#summernote').summernote();
});
</script>
页面加载了表单,但它完全没有样式。不是Bootstrap的味道。我哪里出错?
答案 0 :(得分:0)
是的,这是一个新手的错误。忘了包括:
url = 'https://httpbin.org/redirect-to?url=http%3A%2F%2Fhttpbin.org%2Fpost'
data = {'name': 'Hello'}
while True:
rep = requests.post(url, data=data, allow_redirects=False)
if rep.status_code in [301, 302]:
url = rep.headers.get('location')
print 'redirect to', url
continue
break
print rep.text