DEV Community

Cover image for Bread and Butter Django - Building SaaS #58
Matt Layman
Matt Layman

Posted on • Originally published at mattlayman.com

2 1

Bread and Butter Django - Building SaaS #58

In this episode, I worked on a views and templates. There are a number of core pages that are required to flesh out the minimal interface for the app. We're building them.

I began by showing the page that we were going to work on. I outlined the changes I planned to make, then we started.

The first thing we added was data about the school year, the main model on display in the page. I showed how to mock in the elements before adding real data.

Once the data was mocked in, I wrote some model methods on SchoolYear to get the data that I needed to display. I created a display_days method that will show the days that the school year runs on.

After I had the new method, we plugged it in and continued to expand the remainder of the template. I used the Django date template tag to format some dates.

Then we added buttons for the action elements that the page will have.

To finish the stream, we set the grid layout of where the courses will display for each grade level.

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)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 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