def gen_all_project_graphs(period): from karaage.projects.models import Project from karaage.graphs import gen_project_graph import datetime project_list = Project.objects.all() end = datetime.date.today() start = end - datetime.timedelta(days=period) for p in project_list: for mc in p.machine_categories.all(): gen_project_graph(p, start, end, mc)
def gen_usage_graph(self, start, end, machine_category): from karaage.graphs import gen_project_graph gen_project_graph(self, start, end, machine_category)
def gen_usage_graph(self, start, end, machine_category=None): if machine_category is None: machine_category = self.machine_category from karaage.graphs import gen_project_graph gen_project_graph(self, start, end, machine_category)