def get_user_projects_with_simple(user): project_query = Project.indexLookup("owners_bin", user.key) projects = project_query.all() project_query = Project.indexLookup("participants_bin", user.key) projects.extend(project_query.all()) for i in xrange(len(projects)): projects[i] = {"key" : projects[i].key, "name" : projects[i].name} return projects
def _add_to_projects(email, u, t): projects_query = Project.indexLookup("unregistered_bin", email + " " + t) for project in projects_query.run(): project.addIndex(t + "_bin", u.key) project.removeIndex("unregistered_bin", email + " " + t) project.save()