title: Django no such column ForeignKey
body: <p>I'm doing a Django project (kind of social network) and want to have a page where I can see all my posts, which I did.</p>
  
  <p>I allways get the error: no such column: uploaded_by</p>
  
  <p>in models.py</p>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import User
  
  class ContentItem(models.Model):
      upload_date = models.DateTimeField(auto_now=True)
      title = models.CharField(max_length=100, default='no title')
      description = models.CharField(max_length=400, default='no description')
      image = models.ImageField(upload_to='image_board/posts/', default='null')
      uploaded_by = models.ForeignKey(User, default='0')
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>in views.py</p>
  
  <pre><code>def view_my_favorites(request):
      all_posts = ContentItem.objects.raw('SELECT * FROM image_board_ContentItem WHERE uploaded_by = request.user.username')
      template = loader.get_template('favorites.html')
      context = {
          'all_posts': all_posts,
      }
      return HttpResponse(template.render(context, request))
  </code></pre>
  
  <p>I want to get the user name of the user who is loged in, how can i whrite this in the sql query?</p>
  
  <p>Thaks guys :) </p>