django报错汇总

1. django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module

__init__.py文件中添加以下代码:

import pymysql
pymysql.install_as_MySQLdb()

2. index() takes 0 positional arguments but 1 was given 

# 视图函数必须要传入一个参数request
def index(request):
    pass

你可能感兴趣的:(django,python,后端)