【发布时间】:2019-11-29 23:26:07
【问题描述】:
我正在尝试在 Debian 上使用 Django Rest 创建一个 rest API, 但是当我运行命令“python3 manage.py migrate”时会抛出这个异常
错误:数据库驱动程序不支持现代数据时间类型。”) django.core.exceptions.ImproperlyConfigured:数据库驱动程序不支持现代数据时间类型。
已安装:
msodbcsql17 is already the newest version (17.3.1.1-1).
freetds-bin is already the newest version (0.91-6.1+b4).
freetds-dev is already the newest version (0.91-6.1+b4).
tdsodbc is already the newest version (0.91-6.1+b4).
unixodbc-dev is already the newest version (2.3.7).
unixodbc is already the newest version (2.3.7).
文件:odbc.ini
[MYSERVER]
Description = Django SQLServer
Driver = FreeTDS
Trace = Yes
TraceFile = /tmp/sql.log
Database = DjangoDB
Servername = MYSERVER
UserName = sa
Password = *******
Port = 1433
Protocol = 8.0
文件:odbcinst.ini
[FreeTDS]
Description=FreeTDS Driver for Linux & MSSQL on Win32
Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup =/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
UsageCount=1
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
UsageCount=1
文件:freetds.conf
[global]
# TDS protocol version
tds version = 8.0
[MYSERVER]
host = localhost
port = 1433
tds version = 8.0
【问题讨论】:
标签: django django-rest-framework odbc freetds