NSS-Day-Cohort-58 / rare-python-server-striking-dragons

rare-python-server-striking-dragons created by GitHub Classroom
0 stars 0 forks source link

Create Tags (2) #44

Open jsa-codes opened 2 years ago

jsa-codes commented 2 years ago

Create Tags

  1. Define a create_tag function and define a new_tag parameter to store the information sent from the client
  2. Connect to the database
  3. Create a cursor
  4. Write the SQL statement
INSERT INTO Post (see **Tags Table** in **ERD** for associated fields)
   ( id, label )
VALUES
   ( ?, ?, ? )
  1. Create instances of corresponding model
  2. Convert instances to __dict__
  3. Return data