def model_repr(model):
    """A more convenient replacement for db.Model.__repr__."""
    if model.is_saved():
        key = model.key()
        return '<%s: %s>' % (key.kind(), key.id() or repr(key.name()))
    else:
        return '<%s: unsaved>' % model.kind()

    # Use a dummy password when connecting to a development app server.
    password = (address == 'localhost' and 'foo') or None