• 8 hours
  • Medium

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 8/30/22

Get Rid of Bugs in a Web Project

Fix Bugs in a Flask Web Project

Let’s fix the bugs in our project so we can finally play rock-paper-scissors!

Debugging our Flask project started with a server port error. To fix it, we closed the program using the same port. 

Then all that was left was to resolve the 404 errors and others individually. To do this, we had to:

  • Check that everything was written correctly;

  • Check the correspondence between the template and the route;

  • Check that none of the files had the type “.html,” which we don’t need to use in Flask.

Get Rid of Bugs in a Django Web Project

Now it’s time to resolve the bugs in our Django project! Join me in the screencast below.

The first error we fixed was a port server error. We had to close the program that was utilizing the port that Django uses by default, or change the default port parameters. 

To resolve the different 404 and 500 errors, we checked the existence of the views and routes and the correspondence between them. We also checked that the template files didn’t have the type “.html,” which changes the route and prevents Django from finding them. 

Over to You!

Our program is almost working! However, I left one last bug for you to resolve. You can find the Flask and Django versions in the GitHub repository. 

When you’re finished, download the working programs from the GitHub repository to compare your work with mine, in the Flask and Django versions

Let’s Recap!

We debugged the project in Flask and Django by:

  • Importing the missing modules.

  • Using objects and methods correctly.

  • Resolving logic errors in the program.

  • Searching the documentation.

You’re now equipped with all the skills you need to detect, manage, and eliminate bugs—give yourself a big pat on the back! To finish, you’ll examine software craftsmanship before looking back over everything you learned. See you in the next chapter!

Example of certificate of achievement
Example of certificate of achievement