mirror of
https://gitee.com/smartchart/smartchart
synced 2025-05-05 09:09:24 +08:00
fix bug for python3.6 and django2.1
This commit is contained in:
parent
880bdc0e30
commit
2711c436c6
@ -14,7 +14,8 @@
|
|||||||
#### 安装使用说明:
|
#### 安装使用说明:
|
||||||
```python
|
```python
|
||||||
|
|
||||||
pip install django-smartchart
|
pip install django-smartchart #只支持最新版Python3.9.x
|
||||||
|
pip install django-smartchart==3.6 #支持python3.6.x
|
||||||
|
|
||||||
安装完成后, 你可以直接在命令行输入smartchart,即可启动
|
安装完成后, 你可以直接在命令行输入smartchart,即可启动
|
||||||
访问url: http://127.0.0.1:8000, 帐号密码都是admin
|
访问url: http://127.0.0.1:8000, 帐号密码都是admin
|
||||||
@ -35,6 +36,7 @@ from django.views.generic import RedirectView
|
|||||||
path('echart/', include('smart_chart.echart.urls')),
|
path('echart/', include('smart_chart.echart.urls')),
|
||||||
path('', RedirectView.as_view(url='echart/index/')), #smartchart报表管理页, 自行更改路由
|
path('', RedirectView.as_view(url='echart/index/')), #smartchart报表管理页, 自行更改路由
|
||||||
6. 初始化DB, 命令行输入:
|
6. 初始化DB, 命令行输入:
|
||||||
|
python manage.py makemigrations
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
7. 建立管理员帐号, 如果已有可忽略
|
7. 建立管理员帐号, 如果已有可忽略
|
||||||
python manage.py createsuperuser
|
python manage.py createsuperuser
|
||||||
|
@ -26,7 +26,7 @@ SECRET_KEY = '#$lc1_v_)tof%192ew9fow#o+1#d1qu74d@c11y*sgjqkkl*&b'
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
@ -79,7 +79,7 @@ WSGI_APPLICATION = 'django_smartchart.wsgi.application'
|
|||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user