Last active
October 3, 2018 20:37
-
-
Save jaidetree/488eaa2b69a16ca57aacba234a5ba212 to your computer and use it in GitHub Desktop.
What is the best way to format this multi-line Python code?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # What is the best way to format this multi-line Python code? | |
| ############################################################# | |
| self.queryset = self.queryset.filter( | |
| Q( | |
| name__istartswith=self.query_params.get('name') | |
| ) | Q( | |
| venues__name__istartwith=self.query_params.get('name') | |
| ) | |
| ) | |
| # In JavaScript I would do... | |
| self.queryset = self.queryset | |
| .filter( | |
| Q(name__istartswith=self.query_params.get('name')) | |
| | Q(venues__name__istartswith=self.query_params.get('name')) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment