DEV Community

Cover image for A Week At A Time - Building SaaS #46
Matt Layman
Matt Layman

Posted on • Originally published at mattlayman.com

1

A Week At A Time - Building SaaS #46

In this episode, we worked on a weekly view for the Django app. We made navigation that would let users click from one week to the next, then fixed up the view to pull time from that particular week.

The first thing that I did was focus on the UI required to navigate to a new weekly view in the app. We mocked out the UI and talked briefly about the flexbox layout that is available to modern browsers.

From the UI mock up, I changed the view code to include a previous_week_date and next_week_date in the view context so we could change the links to show real dates.

From there, we needed a destination URL. I create a new path in the URLconf that connected the weekly URL to the existing app view that shows the week data.

After wiring things together, I was able to extract the week date from the URL and make the view pull from the specified day and show that in the UI.

Finally, we chatted about the tricky offset calculation that needs to happen to pull the right course tasks, but I ended the stream at that stage because the logic changes for that problem are tedious and very specific to my particular app.

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

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay