title: How to get currently logged user in class-based view?
body: <p>I have class-based view:</p>
  
  <pre><code>class AddView(CreateView):
      model = MyModel
      fields = '__all__'
  </code></pre>
  
  <p>MyModel:</p>
  
  <pre><code>from django.contrib.auth.models import User
  
  class MyModel(models.Model):
      user = models.ForeignKey(User)
  </code></pre>
  
  <p>I'd like to automatically set currently logged user into field 'user' whenever new record is added. How can I do that ?</p>