-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Fixed #26257 -- Added support for expressions in model's Meta.ordering #8673
Conversation
1d397e5
to
135e850
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation updates for Meta.ordering and release notes are needed. Check your work using the patch review checklist. Thanks!
tests/ordering/tests.py
Outdated
Test of using F expressions in default ordering. (#28335) | ||
""" | ||
articles = OrderedByFExpressionArticle.objects.all() | ||
articles.filter(headline="Article 2").update(author=self.author_2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single quotes (unless a string contains a single quote) as described in Python coding style.
tests/ordering/tests.py
Outdated
|
||
def test_default_order_by_f_expression(self): | ||
""" | ||
Test of using F expressions in default ordering. (#28335) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstrings should state the expected behavior and omit prefixes like "Tests that" since all tests test things. Ticket references should be reserved for obscure issues (not needed here). These guidelines are from Python coding style.
d5a1930
to
e832abd
Compare
Added documentation and release note |
A |
9ea2181
to
093fd47
Compare
https://code.djangoproject.com/ticket/26257