Beispiel #1
0
    def remove_old_buildouts(self, name):
        """Remove old buildouts."""
        buildouts_to_keep = Settings.get_buildouts_to_keep()
        buildouts = Buildout.get_by_name(name)

        if buildouts.count() > buildouts_to_keep and buildouts_to_keep > 0:
            for buildout in buildouts[buildouts_to_keep:]:
                DBSession.delete(buildout)
Beispiel #2
0
    def remove_old_buildouts(self, name):
        """Remove old buildouts."""
        buildouts_to_keep = Settings.get_buildouts_to_keep()
        buildouts = Buildout.get_by_name(name)

        if buildouts.count() > buildouts_to_keep and buildouts_to_keep > 0:
            for buildout in buildouts[buildouts_to_keep:]:
                DBSession.delete(buildout)
Beispiel #3
0
    def __call__(self):
        """Settings main view."""

        buildouts_to_keep = Settings.get_buildouts_to_keep()
        return {'buildouts_to_keep': buildouts_to_keep, 'main': self.main}
    def __call__(self):
        """Settings main view."""

        buildouts_to_keep = Settings.get_buildouts_to_keep()
        return {'buildouts_to_keep': buildouts_to_keep, 'main': self.main}