0

每次我跑步时,manage.py我都会得到 SpatiaLite 横幅。

SpatiaLite version ..: 3.0.0-beta   Supported Extensions:
- 'VirtualShape'    [direct Shapefile access]
- 'VirtualDbf'      [direct Dbf access]
- 'VirtualText'     [direct CSV/TXT access]
- 'VirtualXL'       [direct XLS access]
- 'VirtualText'     [direct CSV/TXT access]
- 'VirtualNetwork'  [Dijkstra shortest path]
- 'RTree'       [Spatial Index - R*Tree]
- 'MbrCache'        [Spatial Index - MBR cache]
- 'VirtualSpatialIndex' [R*Tree metahandler]
- 'VirtualFDO'      [FDO-OGR interoperability]
- 'SpatiaLite'      [Spatial SQL - OGC]
PROJ.4 Rel. 4.7.1, 23 September 2009
GEOS version 3.2.2-CAPI-1.6.2

即使当我试图dumpdata(搞砸我的转储)时,它也会在runserver提供 HTML 请求时出现(分页请求历史记录)。如何抑制此识别消息?

4

2 回答 2

0

从 spatialite 2.2 开始,横幅始终存在,没有删除它的选项。

在 src/shell/shell.c 中:

spatialite_init (1);

1 表示冗长。

如果要删除它,请将值更改为 0 并重新编译 spatialite 或更新到 libspatialite 和 spatialite-tools 到 4.2.0,其中包含 -silent 选项。

无论哪种方式,您都可以直接使用 spatialite 二进制文件,因为 python manage.py dbshell 不接受传递给命令行的选项。

于 2014-11-13T22:58:55.753 回答
0

我最终创建了一个 shell 函数来删除横幅:

sp(){ spatialite $* | head -n +14 ; }

但我没有看到它在 Django 框架中。对不起,噪音。

于 2015-07-01T13:26:10.380 回答