title: Django ordering by multiple fields
body: <p>I am having strange issue with django ordering. For some reason I am not able to order my List View by multiple fields.</p>
  <p>Here is my class.</p>
  <pre><code>class Syslog(models.Model):
  
      receivedat = models.DateTimeField(default=timezone.now)
      facility = models.PositiveSmallIntegerField()
      priority = models.PositiveSmallIntegerField()
      fromHost = models.CharField(max_length=50)
      message = models.TextField(max_length=500)
  
      class Meta:
             ordering = ['id','receivedat', 'fromHost']
  </code></pre>
  <p>Here is my view class as well:</p>
  <pre><code>class HomePageView(ListView):
      model = Syslog
      template_name = 'home.html'
      context_object_name = 'all_logs'
      paginate_by = 10
      ordering = ['-id', 'receivedat', 'fromHost']
  </code></pre>
  <p>When a single field in <code>ordering</code> is specified (e.g. <code>ordering = ['-id']</code>), but when I add a second or third parameter everything goes back to defaults (only the first field of ordering is getting recognized)</p>
  <p>Does anyone have encounter a similar problem?</p>
  <p>The same problem persists in the Django shell as well. When I execute the following query <code>Syslog.objects.all().order_by('id')</code> everything looks good, but when I add another field to order_by (e.g. <code>Syslog.objects.all().order_by('id','fromHost')</code>) the second field doesn't get recognized at all.</p>
  <p>Regards,
  Jordan</p>