DEV Community

Cover image for A View From Start To Finish - Building SaaS #60
Matt Layman
Matt Layman

Posted on • Originally published at mattlayman.com

2

A View From Start To Finish - Building SaaS #60

In this episode, I created a view to add students from beginning to the end. I used Error Driven Development to guide what I needed to do next to make the view, then wrote tests, and finished it all off by writing the template code.

At the start of the episode, I gave a quick overview of the models in my application and which models I planned to focus on for the stream.

We worked on a view to add students. I did this using a technique that I called Error Driven Development. With this strategy, I started with what I wanted and followed the error messages to drive to what I needed to write. Django's error messages are good enough to show what was needed for each step.

After creating a view that didn't error anymore, I filled in some tests to prove that the view behaved in the way I wanted.

Finally, I wrote the template that provides the proper data for the newly created view.

Once the template was complete, I did one manual end-to-end test to confirm that the template and view worked together. I verified in the Django admin that the view created a new student.

This article first appeared on mattlayman.com.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay