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

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

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

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay