예제 #1
0
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)
예제 #2
0
파일: models.py 프로젝트: russell/karaage
 def gen_usage_graph(self, start, end, machine_category):
     from karaage.graphs import gen_project_graph
     gen_project_graph(self, start, end, machine_category)
예제 #3
0
    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)