Not sure how strictly you want to stick to the webdev group's guidelines, but we have a set of guidelines for import statements: http://mozweb.readthedocs.org/en/latest/coding.html#import-statements

In this case, random should be at the top, then all the django imports, then the rest framework and nose, then the oneanddone imports.