application almost moved to rails from django