Understanding decorators

By : Akshar Raaj

Understanding decorators in Python

We will divide this post into two topics

  1. Functions are objects and they can be passed around.
  2. Writing few decorators

As usual, I will be trying out the code in ipython and I suggest you to do the same.

Functions can be passed around similar to any other object in Python.

If you are already familiar with this, you can skip to next section.

Let's first write a class.

>>> class A(object):
...     def __init__(self, a):
...         self.a = a
...

Let's create an instance of this class.

>>> obj = A(5)    
>>> print obj.a
5                 #output ...

more info..

Not exactly, not exactly tim the enchanter

By : Javed Khan

I've been putting off writing about my experience with django form wizard for some time now. I came across this blog post by Kenneth Love which finally compelled me to write this down.

About Django Form Wizard:

Form Wizard can be handy when you have a huge form, and you want to make it less intimidating to the user by splitting it into multiple steps.

If you have glued multiple forms together with sessions or whatnot and it turned out to be a mess, you now what I'm talking about :)

Think surveys, checkouts, lengthy registrations etc.

The class ...

more info..
Topics : django forms wizard

The missing documentation for django.utils.datastructures

By : Thejaswi Puthraya

Note

django.utils.datastructures is intentionally not documented by the django core devs because it is an internal API and is liable to change without any notice. This file is not governed by django's lenient backwards-compatible policy. You have been sufficiently warned!

With the note out of the way, let's look at the interesting datastructures in this file. You may ask why we should learn about those when we shouldn't be using them? Reading code is the best way of learning and this file has some beautiful code.

MergeDict is the first of the datastructures in the ...

more info..
Topics : django internals
© Agiliq, 2009-2012