wrote models and base.html