code from working with tango with django