June 11, 2020 » Django on Matt Layman » [Archived Version]
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. At the start of the episode, I gave a quick overview of the models in my application and which models I planned to focus on for the stream.
Read MoreJune 10, 2020 » Django Chat » [Archived Version]
Eric is the author of Python Crash Course, the bestselling Python book in the world. We discuss his background as a high school teacher, attending PyCon for the first time, and his current projects.
Read MoreJune 4, 2020 » Django on Matt Layman » [Archived Version]
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. The stream started with me answering a question about how I design a new feature. I outlined all the things that I think through for the different kinds of features that I need to build.
Read MoreJune 3, 2020 » Django Chat » [Archived Version]
Daniel and Audrey Feldroy are the authors of the updated book Two Scoops of Django as well as Django Crash Course. They created the popular cookiecutter, cookiecutter-django, and django-crispy-forms packages, as well as the Django Packages website.
Read MoreMay 28, 2020 » Django on Matt Layman » [Archived Version]
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. I began by showing the page that we were going to work on. I outlined the changes I planned to make, then we started. The first thing we added was data about the school year, the main model on display in the page.
Read MoreMay 27, 2020 » Django Chat » [Archived Version]
David is the author of the popular django-rest-framework-simplejwt package. We discuss authentication, JWTs, and his current role at an AI startup.
Read MoreMay 23, 2020 » Clivern » [Archived Version]
You can do that in Django using a middleware. The middleware needs to generate a unique request id (e.g. using UUID) and associate that id with the request. First way is to attach that id to the request.META in the middleware. the only problem is that you have to fetch that id from the request […] The post Adding a Unique Request ID to Each Request in Django first appeared on Clivern.
Read MoreMay 21, 2020 » Django on Matt Layman » [Archived Version]
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. We started by looking at the current state of the test suite to provide a baseline to compare against. After that, I went to PyPI to find the version of pytest-django that we wanted to install. I added the package to my requirements-dev.
Read MoreMay 20, 2020 » Django Chat » [Archived Version]
Nina is a Cloud Developer Advocate at Microsoft, Twitch Streamer, Pythoniasta, PyCon 2019 Keynoter, long-time DjangoCon speaker, and now teacher at FrontendMasters. We discuss learning Python & Django mid-career, VSCode, Azure, and more.
Read MoreMay 17, 2020 » django on roschegel » [Archived Version]
I’m always trying to find ways to make tests easier to read and extend. I hate working through a really hard feature and having to spend a big amount of time writing tests. Lately, I’ve been bothered by the amount of boilerplate on my test code. So, I decided to do some research and look for alternatives. When testing Django applications, I use a combination of Pytest fixtures and FactoryBoy to write tests that need database records. Pytest Fixtures allow you to abstract the initi…
Read More