stay Django After the completion of the project , stay 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'
: '', } }
And then again 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 making,igrations python

©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if