Showing posts with label big nerd ranch. Show all posts
Showing posts with label big nerd ranch. Show all posts

Tuesday, June 12, 2007

What a day

It's the end of the second day and we covered a lot of ground -- admin, views, templates and newforms.

The biggest knowledge gain for me was newforms -- they're very nice. I'm no slouch when it comes to HTML, but this is one task I'm glad Django automates for me. I've spent enough time debugging/writing code to handle form input/form generation -- this is really one area where I think Django shines above Rails (not that they're competing against each other... they're just the two "next gen" frameworks I've tried).

One thing that did bug me is that there must be a better way to remove the "------" choice from a Django ForeignKey <select> representation than my way:

good_choices = []
for choice in Form.base_fields['todo_list'].widget.choices:
if choice[0]:
#Cuz if it's false, it's probably the stupid -------- choice
good_choices.append(choice)

Form.base_fields['todo_list'].widget.choices = good_choices


Tomorrow is Forms Part II....

Monday, June 11, 2007

So far, so good

It's still the middle of our first day of training, but it's going well.

Our instructor, Juan Pablo-Claude, did a good rundown of what Django is -- probably could use a bit of background on its history, but maybe later as we get into specific design decisions the core team made.

Our first day, so far, has been setup and install of Python, the DB drivers, Django, etc. Personally, I've realized how quasi-painful that can be (esp. when I sat down with our summer intern to do this the other day) -- I'm thinking it'd be cool I could build a Parallels image (maybe VM?) of something like Ubuntu/CentOS that has everything you need and the ability to mount it onto your Mac as a filesystem, so you can use your favorite Mac text editor (Textmate, presently).

Also, Juan's done a good job of pulling together some Python basics for folks new to Django (and thus Python) -- though I may be biased as I've got about 4+ years of Python experience...