Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Django>=1.6) AttributeError: 'Query' object has no attribute 'ordering_aliases' #29

Open
karanlyons opened this issue Aug 7, 2013 · 2 comments

Comments

@karanlyons
Copy link

It looks like ordering_aliases has moved out of the Query object in db/models/sql/query.py into the SQLCompiler object in db/models/sql/compiler.py, as of django/django@2f35c6f.

As a result, the line in johnny/cache.py referencing cls.query.ordering_aliases fail with an AttributeError.

I'm not entirely sure how easy this is to fix. It looks like cls refers to SQLCompiler and so now has an ordering_aliases property, but I don't know enough about these parts of Django and johnny-cache to confirm that swapping out cls.query.ordering_aliases for cls.ordering_aliases is a viable solution. But it seems to work.

@BertrandBordage
Copy link
Contributor

This issue can be closed.

@dwickwire
Copy link

Clearing the cache resolves this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants