This should be a command within the central server app.  You're having trouble importing settings because you're not within Django.  Use the command framework to make this easier.