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

Improve Django version check #4

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

adamchainz
Copy link
Contributor

Builds on top of #3 , which should be merged first.

django.VERSION is a pre-parsed tuple of Django's version for use in comparisons. There's no need to call get_version() or try parsing it yourself.

Also tuples compare lexicographically, so you can do >= (4, 1) safely!

@jacklinke jacklinke merged commit 9190f23 into OmenApps:main Apr 25, 2022
@adamchainz adamchainz deleted the django_version_check branch April 25, 2022 08:32
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