Django initialize the database has encountered a problem (python manage.py migrate)

问题:django.db.utils.InternalError: (1049, "Unknown database 'main'")

 Create database to perform on the main Django configuration database to create main database

问题:AttributeError: 'str' object has no attribute 'decode'

Because django of python2.x and 3.x support is not the same, in python3.x the need to comment out the following code (if two sentences)

 

Guess you like

Origin www.cnblogs.com/newtom/p/11724581.html