Python

A collection of 122 articles

  • #Python
  • #Django
  • #auth

Episode 10 - User Auth

On this episode, we’re going to look at working with users in a Django project. We’ll see Django’s tools for identifying users and checking what those users are permitted to do on your website.

  • #Python
  • #Django
  • #views

Reordering Models - Building SaaS #80

In this episode, we looked at an UpdateView for the GradeLevel model in the homeschool application. Along the way, I had to display some UI elements on the grade to give users the ability to adjust the ordering of courses within their grade level.

  • #Python
  • #Django
  • #Hugo
  • #WhiteNoise
  • #Gunicorn

Make A Hugo Static Blog Inside A Django App

Without using a subdomain, Django’s static files, or a reverse proxy, can you build a statically generated blog into your Django app? Yes! I’ll show you how I created a static blog in Hugo and added it to my Django project.

  • #Python
  • #Django
  • #templates

WhiteNoise Shenanigans - Building SaaS #79

In this episode, I worked on a method of adding static content to a site that didn’t involve the staticfiles directory, a separate domain, or a reverse proxy like Nginx. We had to get clever with Heroku buildpacks and how to configure WhiteNoise.

  • #Python
  • #Django
  • #templates

Create A Form Template - Building SaaS #78

In this episode, I created a template for one of my new forms on the new social media app that I’m building. We talked about context data, template styling, and special considerations for forms in templates.

  • #Python
  • #Django
  • #authentication
  • #authorization

User Authentication

Our focus in this Understand Django article is how to manage users in your Django application. We’ll study Django’s built-in user authentication system.

  • #Python
  • #Django
  • #forms

Sending Invites - Building SaaS #77

In this episode, I worked on the form that will send invites to users for the new social network app that I’m building. We built the view, the form, and the tests and wired a button to the new view.

  • #Python
  • #Django
  • #applications

Episode 9 - Application Examination

On this episode, we will study the structure of a Django application. Applications are the core components that make up a Django project.

  • #Python
  • #Django
  • #design

Capped Social Network - Building SaaS #76

In this episode, I started a new project to build a different kind of social network. This social network will contain a max number of connections to encourage thoughtful choice when growing your personal network. We talked MVP features and put in the basics of a Django app.

  • #Python
  • #Django
  • #templates

Make A Landing Page - Building SaaS #75

In this episode, I added a landing page design to the app that I’m building. By using a Tailwind CSS landing page template, I could fit the design in with my existing CSS tools.

  • #Python
  • #Django
  • #django-hijack

Hijack To Help Customers

When customers report their thorniest problems and all of your diagnostic tools have failed you, how can you help? In this article, we explore a technique and a tool for Django apps that can help you swoop in and save the day.

  • #Python
  • #Django
  • #templates

Check Web App Security With Bandit - Building SaaS #74

In this episode, I integrated the bandit static analysis tool to do automated security checking of my code before each commit. We talked about pre-commit and how to add in a new hook. After finishing that tool addition, we got deep into Django while removing some messages inserted by django-allauth on sign up.

  • #Python
  • #Django
  • #applications

Anatomy Of An Application

This article explores applications. Applications are core structural elements of a Django project. We will see the composition of an app and how to use them effectively.

  • #Python
  • #Django
  • #templates

Dynamically Regrouping QuerySets In Templates - Building SaaS #73

In this episode, we worked on a new view to display course resources. While building out the template, I used some template tags to dynamically regroup a queryset into a more useful data format for rendering.

  • #Python
  • #Django
  • #hackathon

From Concept To Live In Two Weeks With Django

How can you build a fully functional web application for a customer in a short period of time? I share my experience building such a web app for a nonprofit organization while participating in a local virtual hackathon in Frederick, MD.

  • #Python
  • #Django
  • #views

Displaying Breaks - Building SaaS #72

In this episode, I worked to add breaks to the display of the week schedule. We had to update context to include the break information into the schedules. I refactored a method out of the calendar display code to make some reusable logic for handling breaks.

  • #Python
  • #Django
  • #admin

Episode 8 - Administering Your App

On this episode, we will focus on the built-in Django administrator’s site. We’ll see what it is, how you can configure it, and how you can customize it to serve your needs.

  • #Python
  • #Django
  • #views

Custom Form Validation - Building SaaS #71

In this episode, I added some custom checking to ensure that students may only be enrolled in a single grade level for a school year. We talked about form cleaning and wrote a for unit test to prove that the change worked. After that change, we switched to a template and wrote copy for when no progress reports are viewable for users.