调整自动字体大小
Increase(字体变大)
Decrease(字体变小)
背景颜色设置
pycharm 左侧菜单问题
解决
pycharm中配置启动Django项目1.先打开mange.py,然后再运行,会提示一堆东西,表示没有配置参数。在pycharm中
点击edit configurations编辑配置参数。
2.点开之后弹出如下对话框,在scrip parameters 对应的对话框中输入配置参数runserver 127.0.0.1:8000.配置完成之后点击ok就完成了。
3.配置完以上信息之后,直接运行一下manage.py文件:出现如下结果,表示配置成功。
4.在浏览器中输入http://127.0.0.1:8000
Django2.2报错 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
准备将 Django 连接到 MySQL,在命令行输入命令python manage.py makemigrations
后报错:django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
由于 mysqlclient 目前不支持高版本python,出现这个错误之后可以根据错误提示找到文件位置,打开 base.py 文件,找到以下代码:
version = Database.version_info
ifversion < (
1,
3,
13):
raise ImproperlyConfigured(
'mysqlclient1.3
.
13or
newer
isrequired; you have %s.' % Database.__version__)
将 if 语句注释掉之后在执行命令就不会再报错
version = Database.version_info
# if version < (1, 3, 13):
# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)
python3报错:AttributeError:strobjecthasnoattributedecode
(2018-10-10 15:19:52)
转载▼
错误代码:query = query.encode(errors='replace')
解决方法:把decode改为encode即可。