Upstream Caching: A Django Developer Crash Course

By Celerity

The Golden Rule for Django Developers is “Don’t prematurely optimize code.” But when a website goes live, user demand can outweigh site functionality, meaning slower page loads and a downgraded user experience. Code optimization is no longer a waste of timeit’s required.

There are several ways to optimize, but scaling out horizontally to deal with growing demand gets expensive. Luckily, there’s still a way to salvage your code without breaking the bank: You can cache.

Read More

Working with Mutually Exclusive Fields in Django Forms

By Daniel Schep, Digital Experience Consultant

Working with Mutually Exclusive Fields in Django Forms

Attention Django developers! When soliciting input from users with an HTML form, you want to design forms to be as flexible as possible. That means you build in multiple form fields to support multiple input options, even if you only want the user to fill in one of them.

Having two or more mutually exclusive fields in a form on a webpage/webapp is a pretty frequent scenario developers have to deal with. Unfortunately, Django's forms have no builtin support for this. In this blog post, I will cover the two simple, but ugly, solutions we Django developers often find ourselves using and introduce a library that makes working with such scenarios much simpler.

Read More

Easy Application Metrics with Statsd for Mobile Strategy

By Joshua "jag" Ginsberg, Principal Technology Architect

In this digital economy, it's not enough to simply deliver a custom web and mobile strategy that meets a client's functional specifications. For our clients focused on incorporating DevOps into their ecosystem and culture, our deliverables need to support their goals of maximizing mean time between failures (MTBF) and minimizing mean time to resolution (MTTR).

Less unplanned work responding to outages and regressions means more time developing features and building products, perfect for Agile development methodologies. If you're going to support fixing breakages faster and even preventatively, you need to be able to see how your applications, services, and systems are performing. For that, we recommend statsd.

Read More

How a Django Developer Can Write Speedy Unit Tests, Pt. 2: Fake it ‘Til You Make It

By Frederick Grim

This post is the second of a two-part series on writing fast and efficient unit tests in Python/Django. If you missed part one, be sure to start here.

At this point, a Django developer using Agile development methodologies will have a good handle on writing focused unit tests and your days of writing only integration tests for all of your features are long behind you. You stay aware of database transactions, and you employ agile software testing with read-only data in mind.

Read More