from django.contrib.auth.models import User
from django.db import models


class Task(models.Model):
    title = models.CharField(max_length=100)
    user = models.ForeignKey(User)

    @property
    def username(self):
        return self.user.username
