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

Fixed #26257 -- Added support for expressions in model's Meta.ordering #8673

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

DimaKudosh
Copy link
Contributor

@DimaKudosh DimaKudosh commented Jun 25, 2017

@DimaKudosh DimaKudosh force-pushed the ticket_28335 branch 2 times, most recently from 1d397e5 to 135e850 Compare June 25, 2017 19:49
@timgraham timgraham changed the title Fixed #28335 - Added query expressions support for default ordering Fixed #26257 -- Added support for expressions in model's Meta.ordering Jul 5, 2017
Copy link
Member

@timgraham timgraham left a 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!

Test of using F expressions in default ordering. (#28335)
"""
articles = OrderedByFExpressionArticle.objects.all()
articles.filter(headline="Article 2").update(author=self.author_2)
Copy link
Member

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.


def test_default_order_by_f_expression(self):
"""
Test of using F expressions in default ordering. (#28335)
Copy link
Member

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.

@DimaKudosh DimaKudosh force-pushed the ticket_28335 branch 2 times, most recently from d5a1930 to e832abd Compare July 9, 2017 17:02
@DimaKudosh
Copy link
Contributor Author

Added documentation and release note

@timgraham
Copy link
Member

A versionchanged annotation is also needed. Did you follow the patch review checklist?

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

Successfully merging this pull request may close these issues.

2 participants