What if we wanted to add more fields to the form like weekly_digest and so on? Well, of course you would have to add a new field to the form and maybe handle extra work in your views. Let’s make this more dynamic.
When writing tests in Django apps, I have an urge to reuse code in setUp() across all tests (most of my apps use the same setUp). So I come up with a GlobalSetup class that other tests should inherit from (it’s located at the project level). However, this approach creates a problem with loading fixtures. According to Django docs:
Hey there! This is my new blog powered by Octropress and hosted on Github.
Octopress was exactly what I was looking for in a blog engine
(Yes, code snippets should be built out of the box in a blog).
I’ve had Blogger previously but ever since I switched it to the new theme, all my github gists
were not able to display. So I abandoned it. I might migrate the posts from Blogger here, however I’ll mainly
focus on writing about Python and Django in this one. That’s about it, stay tuned for the next post. :wq
Having played with Capistrano before, I suddenly had an urge to find its Pythonic alternative. After few google searches, I stumbled upon Fabric. It’s basically a “python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks”. Spent few minutes trying to write functions to deploy Django applications to my Linux server and I have to say, Fabric’s API is really easy to use, very customizable (it’s as easy as wrapping up your shell commands in a python function) and more importantly it has Django integration which I’m gonna need the most. Having said all these, here’s the video demo I recorded while messing around with Fabric, enjoy:
P/S: django-nose, nosegrowl2 and tdaemon were used in order to show notification of testing results (just FYI)
I’ve just registered an account on Google Storage last month and I totally love it as. I particularly like gsutil since I’m most of my time on Terminal. Here are two aliases I use with gsutil in my .bash_profile. Of course, remember to replace your bucket name
Finally got time to continue developing Push Contacts. I’ve gotten a nerve-wrecking problem while developing with C2DM
applications. When the app supposed to get the push message, it didn’t respond to it. Looking at the logs I encountered
an error stack related to GTalk (with TalkProvider tag). Decided to google the problem and the solution was to sign out
of GTalk on the phone.
Yes, TonidoPlug is a new toy that I’ve gotten last week. It is a basically a plug computer that can act likea home server. The hardware specs are the same as SheevaPlug with 1.2GHz ARM and 512MB RAM and 512MB Flash. The best thing
about it is the energy consumption ranging from 5-10 Watts.