Django

A collection of 78 articles

  • #Python
  • #Django
  • #templates

Enrolling Students - Building SaaS #64

In this episode, we worked on a view to enroll students into a grade level for the school year. I added all the context data and used Tailwind to design the form layout to pick from a list of available grade levels. We added a variety of unit tests to prove the correctness.

  • #Python
  • #Django
  • #testing

Django Testing Toolbox

In this article, I cover the tools that I reach for to do automated testing when building a Django application. You will also see some common techniques that I apply to every project.

  • #Python
  • #Django
  • #models

The Home Stretch - Building SaaS #63

In this episode, we return to the homeschool application that I’m building. I’m in the final stretch of changes that need to happen to make the product minimally viable. We worked on a template, wrote some model methods, and did a bunch of automated testing.

  • #Python
  • #Django
  • #models

Episode 6 - Where Does the Data Go?

On this episode, we will learn about storing data and how Django manages data using models.

  • #Python
  • #Django
  • #hackathon

Hackathon App Part 2 - Building SaaS #62

In this episode, we took a break from the regular app to work on an app for a local hackathon that I’m participating in. This is the second week for the hackathon and in this stream, I apply the final touches to the application. We work on models, a template, and build an RSS feed using Django syndication contrib app.

  • #Python
  • #Django
  • #models

Store Data With Models

In this article, we will see how to store data into a database with Django models. The article covers how models act as an interface to let your application store and fetch data.

  • #Python
  • #Django
  • #hackathon

Hackathon App - Building SaaS #61

In this episode, we took a break from the regular app to work on an app for a local hackathon that I’m participating in. My team is building a mobile web app for the homeless around Frederick, MD. In this stream, we cranked through some modeling, admin building, a couple of pages, tests, and templates! We got a lot done!

  • #Python
  • #Django
  • #views

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.

  • #Python
  • #Django
  • #views

Designing A View - Building SaaS #59

In this episode, I focused on a single view for adding a course to a school year. This view is reusing a form class from a different part of the app and sharing a template. We worked through the details of making a clear CreateView.

  • #Python
  • #Django
  • #templates

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.

  • #Python
  • #Django
  • #pytest
  • #testing

Switch A Django Project To Use Pytest - Building SaaS #57

In this episode, I replaced the default Django test runner to use pytest. We walked through installation, configuration, how to change tests, and the benefits that come from using pytest.

  • #Python
  • #Django
  • #bugs

How To Fix A Bug - Building SaaS #56

In this episode, we picked an issue from GitHub and worked on it. I explained the flow of using test driven development to show how the bug existed in an automated test. We wrote the test, then fixed the code. After that, we did some test refactoring to clean things up.

  • #Python
  • #Django
  • #forms

Episode 5 - How To Use Forms

On this episode, we will learn about HTML forms and Django’s form system to use when collecting input from users.

  • #Python
  • #Django
  • #models

Remodeling Data Relationships - Building SaaS #55

In this episode, we’re remodeling! I changed the model relationship between GradeLevel and Course from a ForeignKey (1 to many) to a ManyToManyField. We talked through the change and started fixing all the tests that broke.

  • #Python
  • #Django
  • #forms

User Interaction With Forms

How do users provide data to your website so you can interact with them? We can answer that question by exploring Django’s form system, and the tools that Django provides to simplify your site as you engage with your users.

  • #Python
  • #Django
  • #user testing

User Testing Feedback - Building SaaS #54

In this episode, we worked on issues found from a round of user testing. I talked about how I did user testing with my customer, then started to tackle the usability issues that she identified.

  • #Python
  • #Django
  • #onboarding
  • #forms

More Onboarding Goodness - Building SaaS #53

In this episode, we continued with onboarding. I added unit tests for the new form and explained how foreign keys are wired through in CreateView. Then we marched on to the next template in the flow.

  • #Python
  • #Django
  • #onboarding
  • #forms

Consistent Onboarding - Building SaaS #52

In this episode, we glued together some of the onboarding steps. I added data validation so that future steps depend on data existing from previous steps. Then we added page messaging to direct users to a proper page.