Coding Campus : Days 4 – 5
Thursday was kind of a long day. I arrived at school about a half hour early and left an hour and half later than I normally do to hitch a ride to a GDI ( Girl Develop It! ) meetup. The meetup was interesting. We were all given a dell desktop to take apart and see what is inside a real computer. I took out the memory cards, heating element, fan, graphics card, dvd and floppy drive as well as put them back together. Luckily the women I sat next two encouraged me to keep my pieces organized and that made it so much easier when I had to put them back in the computer. I really wanted to take apart the motherboard but I learned that isn’t something you can do anymore. Motherboards come attached to the computer. It is not something you can install yourself ( bummer! ).
As far as what happened in class… We took a quiz in the morning to see what we had learned so far. The quiz measured what we knew about lists and dictionaries, checked to see if we knew how to write out a for loop, asked us to give examples of a field on a model for each data type and to see if we could give examples of three types of Relationship Fields. I’m a champ with lists and did great there I had to think a little bit about dictionaries and made some educated guesses that ended up being right. Dictionaries are very similar to lists. A big difference is that lists include items and dictionaries include keys and pairs. Providing a model for each data type kinda had me confused. For example when the question asked for a integer field type for the model I knew that an integer was a number but I wasn’t sure to do after that. Its actually pretty simple. I had the number part exactly right but the way you code it is state.Integer(). State is your class and .Integer() is your function/field that you use for Django. As far as the relationship fields go I had the general idea. I thought a one to one relationship was a foreign key but a foreign key is really a one to many relationship 🙂 For lecture we went over more views, urls, and templates. I understand views, urls, and templates so I found this part of Django enjoyable. We ended the class with practicing how to make additional views and adding a view to the assignment we had been working on all week.
It’s the weekend!!! Update ya’ll next week!