docs: def generate_model_file(filename, project, model, fields):
      """Creates a webpage for a given instance of a model."""
      for field in fields:
          field.type = field.__class__.__name__
  
      content = open(os.path.join(os.path.dirname(__file__), 'templates/model_page.html'), 'r').read()
  
      engine = StatikTemplateEngine(project)
      template = engine.create_template(content)
  
      # create context and update from project.config
      context = {'model': model,
                  'fields': fields}
      context.update(dict(project.config.context_static))
      string = template.render(context)
  
      with open(filename, 'w') as file:
          file.write(string)