django-planet

Feed: Django on Matt Layman

Recent content in Django on Matt Layman

Blog Matt Layman
RSS 2.0 Feed Django on Matt Layman
web https://www.mattlayman.com/tags/django/
Last Update12.02.2024
Posts337

How To Fix A Bug - Building SaaS #56

May 14, 2020 » Django on Matt Layman » [Archived Version]

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. We looked at what the issue was and how it is related to the handling of the Course model in a weekly view in the app.

Read More

Episode 5 - How To Use Forms

May 11, 2020 » Django on Matt Layman » [Archived Version]

On this episode, we will learn about HTML forms and Django’s form system to use when collecting input from users. Listen at djangoriffs.com. Last Episode On the previous episode, we looked at templates, the primary tool that Django provides to build user interfaces in your Django app. Web Forms 101 HTML can describe the type of data that you may want your users to send to your site. Collecting this data is done with a handful of tags.

Read More

Remodeling Data Relationships - Building SaaS #55

May 7, 2020 » Django on Matt Layman » [Archived Version]

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. After explaining the change that I wanted to make and why I want to make it, I explained how a foreign key and many to many relationship at the database level. Once we had the conceptual foundation in place, I started with the documentation.

Read More

User Interaction With Forms

May 5, 2020 » Django on Matt Layman » [Archived Version]

In the previous Understand Django article, we saw how Django templates work to produce a user interface. That’s fine if you only need to display a user interface, but what do you do if you need your site to interact with users? You use Django’s form system! In this article, we’ll focus on how to work with web forms using the Django form system. From Browser To DjangoURLs Lead The WayViews On ViewsTemplates For User InterfacesUser Interaction With FormsStore Data With ModelsAdm…

Read More

User Testing Feedback - Building SaaS #54

April 30, 2020 » Django on Matt Layman » [Archived Version]

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. We’re taking a break from building the onboarding flow so that we can take some time to address feedback from user testing with my customer. I started the stream by explaining how I set up user testing and what I got out of the experience.

Read More

More Onboarding Goodness - Building SaaS #53

April 23, 2020 » Django on Matt Layman » [Archived Version]

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. In the last stream, we set all the context data for the view that shows the form to create a grade level for the school. With the context in place, and the form structure set, I added the form class that will create the GradeLevel record.

Read More

Consistent Onboarding - Building SaaS #52

April 16, 2020 » Django on Matt Layman » [Archived Version]

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. We reviewed the way that the form validates certain data from the form submission so that data is kept safe between users. I showed how I switched from the model and fields attributes of CreateView to a form_class containing the form that does the necessary validation.

Read More

Onboarding Forms - Building SaaS #51

April 9, 2020 » Django on Matt Layman » [Archived Version]

In this episode, we added the first form to collect data in the onboarding flow. We used a CreateView and defined all the fields that are needed in the HTML form. I started by filling in the HTML form structure of the page. Once the dummy version was in place, we changed from a TemplateView to a CreateView and began fixing each configuration error that the new view type reported as missing like missing a model field declaration.

Read More

Episode 4 - Building User Interfaces

April 8, 2020 » Django on Matt Layman » [Archived Version]

On this episode, we look at templates, the primary tool that Django provides to build user interfaces in your Django app. Listen at djangoriffs.com. Last Episode On the previous episode, we talked about views and how views handle requests to create HTTP responses for users. Set Up Templates are static files that Django will fill in with data. In order to use those files, we must instruct Django on where to find them.

Read More

Templates For User Interfaces

April 2, 2020 » Django on Matt Layman » [Archived Version]

In the previous Understand Django article, we looked at the fundamentals of using views in Django. This article will focus on templates. Templates are your primary tool in a Django project for generating a user interface. With templates, you’ll be able to build the pages that users will see when they visit your web app. Let’s see how templates hook into views and what features Django provides with its template system.

Read More