Changeset e7d2d98 in theo


Ignore:
Timestamp:
07/15/2020 09:46:22 PM (3 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
65cc53c
Parents:
138f167
Message:

Show versions for integration packages in about page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • theo/web/views/common.py

    r138f167 re7d2d98  
    2828
    2929import theo
     30from theo.config import integrate_catapult, integrate_corepos
    3031
    3132
     
    3536    project_version = theo.__version__ + '+dev'
    3637
     38    def get_packages(self):
     39        packages = super(CommonView, self).get_packages()
     40
     41        if integrate_catapult(self.rattail_config):
     42            import onager
     43            import rattail_onager
     44            import tailbone_onager
     45            packages['onager'] = onager.__version__
     46            packages['rattail-onager'] = rattail_onager.__version__
     47            packages['tailbone-onager'] = tailbone_onager.__version__
     48
     49        elif integrate_corepos(self.rattail_config):
     50            import corepos
     51            import rattail_corepos
     52            import tailbone_corepos
     53            packages['pyCOREPOS'] = corepos.__version__
     54            packages['rattail-corepos'] = rattail_corepos.__version__
     55            packages['tailbone-corepos'] = tailbone_corepos.__version__
     56
     57        return packages
     58
    3759
    3860def includeme(config):
Note: See TracChangeset for help on using the changeset viewer.