Intro to Relational Databases >> Python DB-API >> Quiz: Updating Away the Spam
Troubleshooting where to input the code:
The code is entered into terminal, not into the actual code itself.
So if your server is up and running (you are able to view your page at localhost:8000), then within terminal, input these commands:
- Control – C
- psql forum
- update posts set content = ‘Cheese’ where content like ‘%spam%’;
- OUTPUT (do not type, this is what you will see as output): UPDATE [some number]
- Control – D
- python forum.py
You will be able to see your changes if you reload your localhost:8000 page.