tweaks and ajax implementation for rotation control with django