I'd like to do something like this:
class Task(models.Model): ... created_by = models.ForeignKey(User, default=[LoggedInUser] blank=True, null=True, related_name='created_by')
Is this possible? I couldn't find what's the proper way to get the logged in user, apart from doing request.user, in a view, which doesn't seem to work here.
PS_ I realise I could initialize the Model data by other means, but I think this is the cleanest way.