我是前端和 React js 的新手。我已经在我的应用程序中安装了一个模板。index.html 文件包含 css 的所有链接和路径
index.html
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
{ all the css links and scripts goes here}
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这是我的 app.js 文件。这里我提到了我的上层路线
import logo from './logo.svg';
import './App.css';
import Layout from '../src/Components/Layout/Layout'
import LoginScreen from './Components/Login/LoginScreen'
import { BrowserRouter as Router, Route } from "react-router-dom";
function App() {
return (
<div className="App">
<Router>
<Route path="/pages" component={Layout}/>
<Route path="/login" component={LoginScreen} exact /> …Run Code Online (Sandbox Code Playgroud) 我想将我的 django 应用程序连接到 MS-SQL Server 2014 数据库。我写了这段代码来建立连接。
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'HOST':'DESKTOP-6UNRAN0',
'PORT':'1433',
'NAME': 'MOVIE',
'COLLATION' : '',
}
}
Run Code Online (Sandbox Code Playgroud)
我已经安装了 sql_server.pyodbc
pip install django-pyodbc-azure
Run Code Online (Sandbox Code Playgroud)
如文档https://pypi.org/project/django-pyodbc-azure/ 中所述。我仍然收到错误
django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] 未找到数据源名称且未指定默认驱动程序 (0) (SQLDriverConnect)')
django django-pyodbc sql-server-2014 pypyodbc django-mssql-backend