fix bug for python3.6 and django2.1

This commit is contained in:
JohnYan 2020-11-30 12:30:40 +08:00
parent 880bdc0e30
commit 2711c436c6
2 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,8 @@
#### 安装使用说明:
```python
pip install django-smartchart
pip install django-smartchart #只支持最新版Python3.9.x
pip install django-smartchart==3.6 #支持python3.6.x
安装完成后, 你可以直接在命令行输入smartchart,即可启动
访问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('', RedirectView.as_view(url='echart/index/')), #smartchart报表管理页, 自行更改路由
6. 初始化DB, 命令行输入:
python manage.py makemigrations
python manage.py migrate
7. 建立管理员帐号, 如果已有可忽略
python manage.py createsuperuser

View File

@ -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!
DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']
# Application definition
@ -79,7 +79,7 @@ WSGI_APPLICATION = 'django_smartchart.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}