Python and Django code snippets