Esempio n. 1
0
    def get(self, user, project, nodes, current_node=None):
        nodes_dict = dict((node.key(), node) for node in nodes)
        digraph = "digraph{%s}" % ';'.join(node.digraph(nodes_dict) for node in nodes)
        chart_url = "http://chart.googleapis.com/chart?cht=gv&chl=%s" % urllib.quote(digraph)

        context = context_dict(locals(), 'user', 'project', 'nodes', 'current_node', 'digraph', 'chart_url')
        context['logout_url'] = users.create_logout_url('/')

        page = template.render('templates/project.html', context)
        self.response.out.write(page)
Esempio n. 2
0
    def get(self):
        user = users.get_current_user()

        projects = Project.all()
        projects.filter("owner =", user.user_id())
        projects.order("title")
        projects = tuple(projects) # prevent re-execution when iterating

        context = context_dict(locals(), 'user', 'projects')
        context['logout_url'] = users.create_logout_url('/')

        page = template.render('templates/dashboard.html', context)
        self.response.out.write(page)
Esempio n. 3
0
    def get(self, user, project, nodes, current_node=None):
        nodes_dict = dict((node.key(), node) for node in nodes)
        digraph = "digraph{%s}" % ';'.join(
            node.digraph(nodes_dict) for node in nodes)
        chart_url = "http://chart.googleapis.com/chart?cht=gv&chl=%s" % urllib.quote(
            digraph)

        context = context_dict(locals(), 'user', 'project', 'nodes',
                               'current_node', 'digraph', 'chart_url')
        context['logout_url'] = users.create_logout_url('/')

        page = template.render('templates/project.html', context)
        self.response.out.write(page)
Esempio n. 4
0
    def get(self):
        user = users.get_current_user()

        projects = Project.all()
        projects.filter("owner =", user.user_id())
        projects.order("title")
        projects = tuple(projects)  # prevent re-execution when iterating

        context = context_dict(locals(), 'user', 'projects')
        context['logout_url'] = users.create_logout_url('/')

        page = template.render('templates/dashboard.html', context)
        self.response.out.write(page)