我正在部署一个应用程序,该应用程序第一次在 Heroku 本地运行良好,但出现以下错误:
ModuleNotFoundError:没有名为“phonenumbers”的模块
2021-08-01T05:05:10.359150+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-08-01T05:05:10.359151+00:00 app[web.1]: django.setup(set_prefix=False)
2021-08-01T05:05:10.359151+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
2021-08-01T05:05:10.359152+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)
2021-08-01T05:05:10.359152+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
2021-08-01T05:05:10.359152+00:00 app[web.1]: app_config = AppConfig.create(entry)
2021-08-01T05:05:10.359153+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
2021-08-01T05:05:10.359153+00:00 app[web.1]: module = import_module(entry)
2021-08-01T05:05:10.359153+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2021-08-01T05:05:10.359154+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-08-01T05:05:10.359154+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2021-08-01T05:05:10.359155+00:00 app[web.1]: File "<frozen importlib._bootstrap>", …
Run Code Online (Sandbox Code Playgroud) 想要使用下面的图表,但无法将标题颜色更改为白色,将轴和轴编号更改为灰色(或白色)。这应该高于深色背景。有人知道如何用echarts改变标题颜色吗?
<script type="text/javascript">
// based on prepared DOM, initialize echarts instance
var myChart = echarts.init(document.getElementById('main'));
// specify chart configuration item and data
var option = {
title: {
text: 'Total memebers of the club',
fontColor: 'white',
display: true,
position: 'bottom'
},
tooltip: {},
legend: {
data: ['Total member']
},
xAxis: {
data: ["11/2018", "12/2018", "01/2019", "02/2019", "03/2019", "04/2019"]
},
yAxis: {},
series: [{
itemStyle: {normal: {color: 'white'}},
name: 'Total',
type: 'bar',
data: [5, 384, 612, 2344, 4670, 9372]
}]
}; …
Run Code Online (Sandbox Code Playgroud) 我希望在上传图片时使用 :hint 以立即在表单中显示它。我刚刚发现了该功能,但由于出现错误,似乎没有正确使用它。我正在寻找替换以下内容
<div class="input-group " style="width: 100% !important;">
<span class="input-group-btn">
<span class="btn btn-small btn-primary btn-inverse" onclick="$(this).parent().find('input[type=file]').click();">Browse</span>
<%= f.file_field :avatar, onchange: "$(this).parent().parent().find('.form-control').html($(this).val().split(/[\\\\|/]/).pop());", style: "display: none;" %>
</span>
<span class="form-control"></span>
</span>
</div>
Run Code Online (Sandbox Code Playgroud)
在以下形式中,使用 :hint
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, multipart: true}) do |f| %>
<%= f.error_notification %>
<% if @user.avatar? %>
<%= avatar_for(@user) %>
<% else %>
<%= image_tag("Avatar_default.jpg", alt: "No profile picture", width: "100%") %>
<% end %>
<br>
<%= f.input :avatar, :as => :file, :hint …
Run Code Online (Sandbox Code Playgroud)