Show versions for integration packages in about page
This commit is contained in:
parent
138f167225
commit
e7d2d98e19
|
@ -27,6 +27,7 @@ Common views
|
||||||
from tailbone.views import common as base
|
from tailbone.views import common as base
|
||||||
|
|
||||||
import theo
|
import theo
|
||||||
|
from theo.config import integrate_catapult, integrate_corepos
|
||||||
|
|
||||||
|
|
||||||
class CommonView(base.CommonView):
|
class CommonView(base.CommonView):
|
||||||
|
@ -34,6 +35,27 @@ class CommonView(base.CommonView):
|
||||||
project_title = "tailbone-theo"
|
project_title = "tailbone-theo"
|
||||||
project_version = theo.__version__ + '+dev'
|
project_version = theo.__version__ + '+dev'
|
||||||
|
|
||||||
|
def get_packages(self):
|
||||||
|
packages = super(CommonView, self).get_packages()
|
||||||
|
|
||||||
|
if integrate_catapult(self.rattail_config):
|
||||||
|
import onager
|
||||||
|
import rattail_onager
|
||||||
|
import tailbone_onager
|
||||||
|
packages['onager'] = onager.__version__
|
||||||
|
packages['rattail-onager'] = rattail_onager.__version__
|
||||||
|
packages['tailbone-onager'] = tailbone_onager.__version__
|
||||||
|
|
||||||
|
elif integrate_corepos(self.rattail_config):
|
||||||
|
import corepos
|
||||||
|
import rattail_corepos
|
||||||
|
import tailbone_corepos
|
||||||
|
packages['pyCOREPOS'] = corepos.__version__
|
||||||
|
packages['rattail-corepos'] = rattail_corepos.__version__
|
||||||
|
packages['tailbone-corepos'] = tailbone_corepos.__version__
|
||||||
|
|
||||||
|
return packages
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
CommonView.defaults(config)
|
CommonView.defaults(config)
|
||||||
|
|
Loading…
Reference in a new issue