I have a flask, sqlalchemy, jinja2 app with the follwing problem.
I am trying to display a model in an html table and have pagination with it. The model has a bunch of foreign keys in it, so in the table I see the foreign key. I would like to display the `__repr__` of the model or one of the fields of that model.  

`# models.py`

```
class WorkLog(db.Model):
    __tablename__ = 'work_log'
    id = db.Column(db.Integer, primary_key=True)
    mechanic = db.Column(db.Integer, db.ForeignKey('users.id'))
    building_id = db.Column(db.Integer, db.ForeignKey('buildings.id'))
    elevator_id = db.Column(db.Integer, db.ForeignKey('elevators.id'))
    work_type_id = db.Column(db.Integer, db.ForeignKey('work_type.id'))
    component_id = db.Column(db.Integer, db.ForeignKey('component.id'))
    date = db.Column(db.Date(), default=datetime.utcnow().date())
    time_in = Column(TIME(), default=(datetime.utcnow() - timedelta(hours=4)).time())
    time_out = Column(TIME(), default=(datetime.utcnow() - timedelta(hours=2)).time())
    notes = db.Column(db.Text)

```

The view function passes model with pagination

`#views.py`

```
# build the time review table with pagination
    u = User.query.get(current_user.get_id())

    work_logs = u.work_log.paginate(page, 10, False).items

    return render_template('mechanic/mechanic.html', form=form, logs=work_logs)

```

The relevant part of the template

mechanic.html

```
<table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Building</th>
                            <th>Elevator</th>
                            <th>Work Type</th>
                            <th>Time In</th>
                            <th>Time Out</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for log in logs %}

                            <tr>
                                <td>{{ log.building_id }}</td>
                                <td>{{ log.elevator_id }}</td>
                                <td>{{ log.work_type_id }}</td>
                                <td>{{ log.time_in }}</td>
                                <td>{{ log.time_out }}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>

```

It is the three fields ending id that are a foreign key and that would like to display the `__repr__` for that object or a field. What is my best way to go about this.