Well I’m starting to feel that this project is more like a toboggan run at times. Periodically I’ll be making great progress in a limited amount of time. But once I’m done one part, the toboggan run is over and I have to climb up the hill for the next part. It seems like each new feature requires a hill to climb before I can start making great progress.
This week I added review-requests to the fill-database script. It took while to get going in this section since the implementation in Django was slightly different than I was expecting. Most database entries can be made by making use of the fields declared in their respective models.py file. Sometimes its like an easter-egg hunt trying to find witch models.py file you need. Once you find the appropriate models.py file its a pretty simple task of filling the fields with the appropriate values inside the script, unless, of course, there is a handy ‘objects = ‘ line in there somewhere. That means that the fields need to be filled through a call to a function inside a different class in a different file. Its a little confusing as it seems a bit backwards to a language like Java. Trying to bypass this function throws some ‘field not found’ error. I can see the benefits to this but these sub-functions aren’t that obvious unless you are looking for them.
This next week I’ll be trying to add diffs to the review requests which present its own unique challenges (time to climb up the hill again!).