stay Django After the completion of the project , stay setting.py Set it in mysql Connection parameters :
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME':
'formtask',# Database name , This database should be updated in advance mysql Create a good 'USER': 'root', 'PASSWORD': '123456', 'HOST'
: '127.0.0.1', } }
And then again models.py Created in class class , The database model , One class Class corresponds to a database table :
class icesc_v_templates(models.Model): t_id=models.AutoField(primary_key=True)
v_num=models.IntegerField(blank=True, null=True) Cpu_info=models.CharField(
max_length=20, blank=True, null=True) mem_info=models.CharField(max_length=20,
blank=True, null=True) hard_store=models.CharField(max_length=20, blank=True,
null=True) os_info=models.CharField(max_length=200, blank=True, null=True) env=
models.CharField(max_length=100, blank=True, null=True) remark=models.CharField(
max_length=50, blank=True, null=True) class sysPremod(models.Model): o_id=models
.AutoField(primary_key=True) o_code=models.CharField(max_length=20) o_name=
models.CharField(max_length=50) o_description=models.CharField(max_length=50)
Finally, execute the command line :
pip install mysqlclient python manage.py making,igrations python manage.py
migrate

Technology
©2019-2020 Toolsou All rights reserved,
1190 Reverses the substring between each pair of parentheses leetcodemysql Joint index details You don't know ——HarmonyOS Create data mysql Library process Character recognition technology of vehicle license plate based on Neural Network A guess number of small games , use JavaScript realization Talking about uni-app Page value transfer problem pytorch of ResNet18( Yes cifar10 The accuracy of data classification is achieved 94%)C++ Method of detecting memory leak One is called “ Asking for the train ” A small village Finally got the train