﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28958	Using query expression in model Meta.ordering causes AttributeError in admin	Gabriel Amram	nobody	"When using the newly introduced query-expression ordering feature in either the model's Meta.ordering or in its ModelAdmin causes errors.

Steps to reproduce:
First variant - using the model's Meta.ordering option - 

{{{
//models.py
class Game(models.Model):
    score = models.IntegerField(null=True)

     class Meta:
         ordering = [F(""score"").desc(nulls_last=True)]
...
// admin.py
admin.site.register(Game)
}}}
Accessing the admin site will now give an `AttributeError: 'OrderBy' object has no attribute 'startswith'`

Variant 2 - Using the ModelAdmin ordering attribute:
{{{
//admin.py
class GameAdmin(models.ModelAdmin):
    ordering = [F(""score"").desc(nulls_last=True)]
}}}

`runserver` fails with error: `TypeError: argument of type 'OrderBy' is not iterable`"	Bug	new	contrib.admin	2.0	Normal		query expresssion, ordering, admin, meta		Unreviewed	0	0	0	0	0	0
