web | https://www.mattlayman.com/tags/django/ |
---|---|
Author |
Aug. 26, 2020 » Django on Matt Layman » [Archived Version]
In the previous Understand Django article, we used models to see how Django stores data in a relational database. We covered all the tools to bring your data to life in your application. In this article, we will focus on the built-in tools that Django provides to help us manage that data. From Browser To DjangoURLs Lead The WayViews On ViewsTemplates For User InterfacesUser Interaction With FormsStore Data With ModelsAdminister All The ThingsAnatomy Of An ApplicationUser AuthenticationMiddlewar…
Read MoreAug. 20, 2020 » Django on Matt Layman » [Archived Version]
In this episode, we polished some parts of the application. Now that my first customer is using the app regularly, the feedback is coming in rapidly. We worked to fix some of the issues that she found. The first issue that I tackled dealt with ambiguity about a course’s relationship to a school year on the course’s detail page. I fixed this issue by displaying the grade level on the course page to provide all the details.
Read MoreAug. 13, 2020 » Django on Matt Layman » [Archived Version]
In this episode, I worked on rendering a calendar of important events in a school year. We built out the appropriate data structures, and I wrote some new model methods and added tests. On the last stream, I created a new model to track breaks in the school year. The app now shows the calendar for the school year, and I want to display the breaks on the calendar. Before digging too far into the code, I provided my thoughts about using Docker for development from a question that came from the ch…
Read MoreAug. 6, 2020 » Django on Matt Layman » [Archived Version]
In this episode, we did some Django model development. I created a new model to track break days in a school year. This model will be critical to fill in vacations and holidays so that the scheduling functionality works properly. I added the model, the tests, the admin page, and the create view to create break days in the app. We started by picking a model name and discussing naming in programming.
Read MoreJuly 30, 2020 » Django on Matt Layman » [Archived Version]
In this episode, I created documentation for anyone interested in trying out the application. After documenting the setup, I moved on to fixing a bug with the scheduling display of courses. In the latter half of the stream, we focused on creating a new reports section to show progress reports for students. One of my patrons requested some documentation to explain how to get started with the project. We updated the README.
Read MoreJuly 23, 2020 » Django on Matt Layman » [Archived Version]
In this episode, I updated a model to handle the default duration of new tasks. This default needed to come from the Course model instead of the CourseTask model so we had to determine how best to set that data in various forms. I also fixed some drop down selection bugs that populated a form with the wrong data. We made sure that all the code was well tested. I created a new default_task_duration field to the Course model.
Read MoreJuly 21, 2020 » Django on Matt Layman » [Archived Version]
On this episode, we will explore more about models and how to interact with data in your database. Listen at djangoriffs.com. Last Episode On the last episode, we discussed the basics of setting up a database and creating a model to store data. Working With Models To create new rows in our new database tables, we can use a model’s save method. When you save a model instance, Django will send a message to the database that effectively says “add this new data to this database table.
Read MoreJuly 9, 2020 » Django on Matt Layman » [Archived Version]
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. The enrollment page needed three pieces of data in the context to complete the form. We added the student, school_year, and grade_levels data to the context and wrote tests to show the data in there.
Read MoreJuly 7, 2020 » Django on Matt Layman » [Archived Version]
What are the tools that I use to test a Django app? Let’s find out! You might say I’m test obsessed. I like having very high automated test coverage. This is especially true when I’m working on solo applications. I want the best test safety net that I can have to protect me from myself. We’re going to explore the testing packages that I commonly use on Django projects. We’ll also look at a few of the important techniques that I apply to make my testing experience g…
Read MoreJuly 2, 2020 » Django on Matt Layman » [Archived Version]
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. We started by adding students to the context of the students index page. With the students in the context, we updated the index page to display the list of students.
Read More