Port Django management command from Kitsune and Kuma.

This is work in progress since I need to port over some tests, too ;)