First Time Django
I recently had the privilege of joining up with the Django Girls Seoul study group for Django. Having previous experience with the MEAN stack, I was prepared for something conceptually easy but an absolute mess in practice. I was worried I’d need to memorize dozens of different technologies, untangle dependency hell, and pray to the unholy gods that glued together this ship made of toothpicks while in the middle of a monsoon.
To put it shortly…
I was gloriously wrong
Seriously, this was amazing.
Signing up was easy, and they even assured me they’d have English speakers to help me out. We met at D.CAMP, which as far as I can tell is a startup incubator. It started pretty typically. The organizers introduced themselves and spoke about the study group, then they had everyone introduce themselves.
준범 then proceeded to give a brief lecture on Django, REST, and MVC, or in Django’s case, MVT. I was able to follow most of it, considering most of the tech terms have English origins. The way he explained it was excellent. As someone who also runs an educational meetup, I often feel the desire to jump in if someone is explaining something poorly. With 준범, not even once. From the order of how he progressed through the logic to how he balanced keeping things simple while maintaining accuracy, the concepts were very well explained. He even got an applause afterwards. Hell yeah.
We then started brainstorming ideas. We ended up dividing into three groups, each with its own project: a user management system, a blog, and a Python version of Instagram, or Pystagram. While I’m not much of an Instagram user, I joined that project, as it seemed to have the most interesting problem set.
The class is currently ongoing, and the Pystagram project is based on this series from Kay on the rails. Even running it through a translator, it’s really straightforward. Each of us on the project is working individually, since everyone learns at a different pace, but it’s excellent having access to people with experience. I’ve both asked for help and given help, which is the best of both worlds.
Already knowing MVC, Django is #easyMode. Django does things slightly differently, using MVT instead of MVC. It’s actually a welcome change. I’ve often found my Controllers to be boringly simple. Django handles maybe half of the Controller logic built into the framework, and you use the View to decide how exactly to display your data. The Template is literally that: an HTML template. Simple. Define your data as models. Massage and format your data in the view. Drop it into an HTML via a template. Voilà. Done.
It even handles database migrations for you. Changed how your models are setup? No problem! Django comes with a
manage.py file that will generate and apply schema changes for you. The generated migration files even fit nicely into source control.
manage.py script does more than database migrations. It will generate portions of your app for you, much like Yeoman, but with less crying and gnashing of teeth. This lets you focus on writing your logic instead of writing boilerplate. It’s also organized in a sane way.
Django also has built-in and extension apps, consideration of static assets for deployment, and a built-in admin interface. Overall, it’s just satisfying to work with.
In short, participating in the Django girls study group has been wonderful: great people and great technology. I strongly recommend it to anyone, new or experienced, that wants to experiment with Python-driven web servers.