Django - connect to Mysql database & CRUD APIs
It is easy to connect to Mysql database from Django project. You have to create a database in XAMPP using PhpMyAdmin. Then open settings.py file in djsite/djsite folder. Change the following json values to your database credentials. DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.mysql' , 'NAME' : 'database name' , 'USER' : 'database user' , 'PASSWORD' : 'database password' , 'HOST' : 'localhost' , } } In the jobform folder, open models.py file and add the following code to create JobForm model. The model have the following data fields: - id (auto generated field) - first_name - last_name - dob - sex - email - education (selection field) - position (selection field) - fileatt - submit_date - user_id A job form belongs to an authorized user. Thus, we add user as a foreign key in the jobform table to make the relationship...