Fix models and database such that Django queries now work