Blog

Showing 11 to 15 of 58 blog posts in the technical category.

September 18, 2013
by Tobias McNulty
0 comments

Central logging in Django with Graylog2 and graypy

Django's logging configuration facilities, which arrived in version 1.3, have greatly eased (and standardized) the process of configuring logging for Django projects. When building complex and interactive web applications at Caktus, we've found that detailed (and properly configured!) logs are key to successful and efficient debugging. Another ...

Continue reading →

August 7, 2013
by Tobias McNulty
0 comments

Migrating to a Custom User Model in Django

The new custom user model configuration that arrived in Django makes it relatively straightforward to swap in your own model for the Django user model. In most cases, Django's built-in User model works just fine, but there are times when certain limitations (such as the length of the email ...

Continue reading →

July 17, 2013
by Mark Lavin
0 comments

Factory Boy as an Alternative to Django Testing Fixtures

When testing a Django application you often need to populate the test database with some sample data. The standard Django TestCase has support for fixture loading but there are a number of problems with using fixtures:

  • First, they must be updated each time your schema changes.
  • Second, they force you ...

Continue reading →

June 26, 2013
by Mark Lavin
0 comments

MEDIA_ROOT and Django Tests

If you’ve ever written a test for a view or model with associated uploaded files you might have noticed a small problem with those files hanging around after the tests are complete. Since version 1.3, Django won’t delete the files associated with your model instances when they ...

Continue reading →

June 12, 2013
by Dan Poirier
0 comments

Making your Django app more pluggable

This blog post is about ways of doing things in your Django app, and pitfalls to avoid, so your app is easier to plug in to other sites.

Introduction

One of the most enticing promises of Django is that you’ll be able to add features to your site by ...

Continue reading →