Reading Test Driven Development with Python by Harry Percival (Part extra)
I made a mistake, then I fixed it
This was suppose to be the part where I work on Chapter 3, but then I ran into a road block.
While I was going through the chapter, when I was finally about to write some django code, I realized the urls.py that my django generated did not look like what’s in the textbook: mine had path in the imports and the example have url (if you already know what I am talking about, don’t worry we will get there).
So turns out, the author, Mr Percival even wrote in the warning: “If your urls.py looks different or if it mentions a function called path
instead of url
, it’s because you’ve got the wrong version of Django.”
Omg. I already written so many commits, and wrote so many funny comments, how am I going to fix all this? I deleted my entire directory, re download it again with django 1.11, but then I couldn’t create the superlists that the example wanted me to create!
I was stuck on it for hours!
I posted every error message that was thrown at me to ai, trying to fix it and re fix it but nothing was working!
Just as I was about to give up this project, give up reading this book entirely, I decided to email Mr Percival directly and see what I am doing wrong (in the preface the Mr Percival did mention you can do that), then I found his website and…
There’s a third edition to this book?
and I am reading the second edition?
Then it came back to me.
Couple parts before I did mention that I had to improvise a couple things, some of the stuff in the book was outdated, turns out there’s already an updated version of the text book out there!
Wow, I read through the first few chapters of the 3rd edition, most content are the same, except that it had me using django 4.0 instead!
Ya know, this really just shows you that in the world of computers things are constantly changing and if you don’t keep up you are left behind.
Next part we will resume in tackling chapter 3 of the Test Driven Development with Python.