0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Wagtail Version Command

Merge pull request #6284 from KalobTaulien/wagtail-commands
This commit is contained in:
Kalob Taulien 2020-08-03 07:16:58 -06:00 committed by GitHub
commit 5efedf5db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,9 +242,20 @@ class UpdateModulePaths(Command):
return change_count
class Version(Command):
description = "List which version of Wagtail you are using"
def run(self):
import wagtail
version = wagtail.get_version(wagtail.VERSION)
print("You are using Wagtail %(version)s" % {'version': version})
COMMANDS = {
'start': CreateProject(),
'updatemodulepaths': UpdateModulePaths(),
'--version': Version()
}