我正在尝试在我的项目中找到一些"django-socketio"仓库.我使用django 1.10和python3.我真的搜索过,但我没有找到python3的工作示例.
我糟糕的解决方法
这项工作,但我不敢相信这是一个很好的解决方案..任何人有其他想法?或者使用python3和socketio的工作示例?
谢谢!
我想使用android的传感器来获取指纹。我有一个WebApp,想获取指纹的回调。可以在WebApp中实现指纹扫描仪吗?使用Java或类似的东西?
我尝试使用 Django Cache 来改善我的观点。效果很好,400 毫秒到 8 毫秒是完美的。但是当用户第一次访问页面时,Django 会在标题中缓存包含用户信息的页面,当我尝试注销时,页面会继续包含用户信息。
我也尝试在模板中使用缓存,但效果不好,我的问题来自视图,所以继续 400ms。
我的设置.py
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}
Run Code Online (Sandbox Code Playgroud)
我的看法.py
@cache_page(60 * 15)
def list(request, tag_slug=None):
page = request.GET.get('page')
data = questions_controller.list_questions(request, tag_slug, None, page)
if data:
return render(request, 'questions/list.html', data)
return page_not_found(request, "Page not found")
Run Code Online (Sandbox Code Playgroud) 我有django迁移的问题.我收到此错误:
django.db.migrations.exceptions.NodeNotFoundError: Migration user.0050_merge_20170523_1254 dependencies reference nonexistent parent node ('user', '0049_auto_20170519_1934')
Run Code Online (Sandbox Code Playgroud)
我修复错误,删除一些行,但在修复所有这些错误后,我得到其他:
ValueError: Could not find common ancestor of {'0050_merge_20170523_1254', '0007_auto_20170524_1540'}
Run Code Online (Sandbox Code Playgroud)
我无法解决这个问题.我可以删除数据库并再次makemigrations ...但在生产环境中我想知道如何正确修复,没有drop database哈哈.
谢谢!
django ×3
python ×2
ancestor ×1
caching ×1
dependencies ×1
django-cache ×1
fingerprint ×1
migration ×1
node.js ×1
not-exists ×1
socket.io ×1
sockets ×1