Django
2014

O'Reilly Deal: 50% Off Lightweight Django
O'Reilly Media, the go-to source for technical books, just let us know that they're having a 50% off sale on eBook pre-orders of Lightweight Django today. Use coupon code: DEAL.

Getting Started Scheduling Tasks with Celery
UPDATE: A newer version of this blog post is available for Celery Version 5.0.x.
Getting Started Using Celery for Scheduling Tasks
Many Django applications can make good use of being able to schedule work, either periodically or just not blocking the request thread.

Caktus has a new website!
It’s been a few years since we last updated our website, and we gave it a whole new look!
With the new site, it’s easy to see just what services we offer, and our processes for bringing our client’s ideas to life. The new layout allows for more in-depth reviews of our projects, and also highlights our talented and growing team. We also wanted to share more information on our commitment to the open source community and social good. And the updated structure makes finding out about events and reading our ever-popular blog posts simple.

New for PyCon: App for Group Outings + Giant Duck
For PyCon 2014, we’ve been working for the past few months on Duckling, an app to make it easier to find and join casual group outings. Our favorite part of PyCon is meeting up with fellow Pythonistas, but without someone rounding everyone up and sorting the logistics, we’ve found it difficult to figure who’s going where and when. Our answer to this age-old conference conundrum is Duckling!

Congrats to PearlHacks Winners (Including Our Intern, Annie)!
Caleb Smith, Caktus developer, awarding the third place prize to TheRightFit creators Bipasa Chattopadhyay, Ping Fu, and Sarah Andrabi.
Many congratulations to the PearlHacks third place winners who won Sphero Balls! The team from UNC’s Computer Science department created TheRightFit, an Android app that helps shoppers know what sizes will fit them and their families among various brands. Their prize of Sphero Balls, programmable balls that can interact and play games via smart phones, was presented by Caktus developer and Pearl Hacks mentor Caleb Smith as part of our sponsorship. PearlHacks, held at UNC-Chapel Hill, is a conference designed to encourage female high school and college programmers from the NC and VA area.

Caktus Completes RapidSMS Community Coordinator Development for UNICEF
Colin Copeland, Managing Member at Caktus, has wrapped up work, supported by UNICEF, as the Community Coordinator for the open source RapidSMS project. RapidSMS is a text messaging application development library built on top of the Django web framework. It creates a SMS provider agnostic way of sending and receiving text messages. RapidSMS has been used widely in the mobile health field, in particular in areas where internet access cannot be taken for granted and cell phones are the best communication tool available. This has included projects initiated by UNICEF country offices in Ethiopia, Madagascar, Malawi, Rwanda, Uganda, Zambia, and Zimbabwe.

Managing Events with Explicit Time Zones
Managing Events with Explicit Time Zones
Recently we wanted a way to let users create real-life events which could occur in any time zone that the user desired. By default, Django interprets any date/time that the user enters as being in the user’s time zone, but it never displays that time zone, and it converts the time zone to UTC before storing it, so there is no record of what time zone the user initially chose. This is fine for most purposes, but if you want to specifically give the user the ability to choose different time zones for different events, this won’t work.
2013

Using strace to Debug Stuck Celery Tasks

ShipIt Day 4: SaltStack, Front-end Exploration, and Django Core
Last week everyone at Caktus stepped away from client work for a day and a half to focus on learning and experimenting. This was our fourth ShipIt day at Caktus, our first being almost exactly a year ago. Each time we all learn a ton, not only by diving head first into something new, but also by hearing the experiences of everyone else on the team.

Skipping Test DB Creation
We are always looking for ways to make our tests run faster. That means
writing tests which don't preform I/O (DB reads/writes, disk
reads/writes) when possible. Django has a collection of TestCase
subclasses
for different use cases. The common TestCase handles the fixture
loading and the creation the of TestClient. It uses the database
transactions to ensure that the database state is reset for every test.
That is it wraps each test in a transaction and rolls it back once the
test is over. Any transaction management inside the test becomes a
no-op. Since [TestCase]{.title-ref}[ overrides the transaction
facilities, if you need to test the transactional behavior of a piece of
code you can instead use
]{.title-ref}[TransactionTestCase]{.title-ref}[.
]{.title-ref}[TransactionTestCase]{.title-ref}` resets the database
after the test runs by truncating all tables which is much slower than
rolling back the transaction particularly if you have a large number of
tables.