从1.8升级到django 1.9时出现此错误.我检查了类似问题的答案,但我认为这不是任何第三方软件包或应用程序的问题.
Traceback (most recent call last):
File "manage.py", line 10, in <module> execute_from_command_line(sys.argv)
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 176, in fetch_command
commands = get_commands()
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/utils/lru_cache.py", line 100, in wrapper
result = user_function(*args, **kwds)
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 71, in get_commands
for app_config in reversed(list(apps.get_app_configs())):
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/apps/registry.py", line 137, in get_app_configs
self.check_apps_ready()
File "/home/kishore/.virtualenvs/andone/local/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. …Run Code Online (Sandbox Code Playgroud) 我有一个像这样的html表:
<TABLE>
<TR>
<TD><P>Name</P></TD>
<TD><P>Fees</P></TD>
<TD><P>Awards</P></TD>
<TD><P>Total</P></TD>
</TR>
<TR>
<TD><P>Tony</P></TD>
<TD >7,800</TD>
<TD >7</TD>
<TD>15,400</TD>
</TR>
<TR>
<TD><P>Paul</FONT></P></TD>
<TD >7,800</TD>
<TD >7</TD>
<TD>15,400</TD>
</TR>
<TR>
<TD><P>Richard</P></TD>
<TD >7,800</TD>
<TD >7</TD>
<TD>15,400</TD>
</TR>
</TR>
</TABLE>
Run Code Online (Sandbox Code Playgroud)
我想提取表的值.我试过以下.
import lxml.html
html = lxml.html.parse(''html_table)
text_value = html.xpath('//tr/td/text()')
packages = html.xpath('//tr/td/p')
p_content = [p.text_content() for p in packages]
Run Code Online (Sandbox Code Playgroud)
有没有办法将<p>文本和文本提取<td>到单个列表?
哪个是检索给定国家/地区所有城市的最佳 api?我尝试从 geonames 下载。但似乎数据不可靠。` 是否可以在立交桥 api 中查询城市以及州和国家/地区?
您能建议一种更好的方式来下载城市及其积分吗?
我创建了一个django项目,使用django-social-auth登录谷歌.
我按照文档在Google开发者控制台中使用"OAuth 2.0"创建了一个应用程序并添加了API
Gmail API, Google+ API, Google+ Domains API and Google+ Hangouts API
Run Code Online (Sandbox Code Playgroud)
在凭证中,我已将AUTHORIZED REDIRECT URIS设置为我的生产服务器URL"mysite.com".
我使用"CLIENT ID"和"CLIENT SECRET"配置了django设置.此设置在我的本地服务器上完美运行,用户已创建,并且电子邮件与用户关联.
但是当我搬到生产服务器时,我得到了错误
"400. That’s an error. OpenID auth request contains an unregistered domain: mysite.com".
Run Code Online (Sandbox Code Playgroud)
有没有其他人面临类似的问题?
python ×3
django ×2
geolocation ×1
geonames ×1
google-api ×1
google-oauth ×1
html ×1
html-table ×1
lxml ×1
oauth-2.0 ×1
overpass-api ×1