web | https://www.mattlayman.com/tags/django/ |
---|---|
Author |
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 MoreMay 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 MoreApril 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 MoreApril 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 MoreApril 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 MoreApril 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 MoreApril 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 MoreApril 2, 2020 » Django on Matt Layman » [Archived Version]
In this episode, we stepped from the welcome onboarding page to the first interactive page in the flow. I extracted the common banner for each of the templates and customized it for each of the steps in the process. The first thing we did was create a button on the starting page. The button connects the welcome page to the second step in the flow where the app will ask for information about the user’s school year.
Read MoreApril 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 MoreMarch 26, 2020 » Django on Matt Layman » [Archived Version]
In this episode, we worked on the progress element that will display in every step of the onboarding flow. I added some labels and styled the banner using Tailwind CSS. At the end of the stream, we boxed in the shape of the welcome page with some placeholder elements. The very first thing I did was insert a top bar that was unstyled to the top of the welcome page. We added some placeholder text for each of the steps in the onboarding flow.
Read More