def get(self): phase_1_projects = Project.query(Project.Phase == ProjectPhases.Phase1) phase_2_projects = Project.query(Project.Phase == ProjectPhases.Phase2) phase_3_projects = Project.query(Project.Phase == ProjectPhases.Phase3) self.context = { 'phase_1_projects': phase_1_projects, 'phase_1_project_count': phase_1_projects.count(), 'phase_2_projects': phase_2_projects, 'phase_2_project_count': phase_2_projects.count(), 'phase_3_projects': phase_3_projects, 'phase_3_project_count': phase_3_projects.count(), } self.renderCmsApp('/projects/vetting_main')
def update_project_phase(project_id, user, phase_id): project = Project.get_by_id(project_id) project.Phase = phase_id project.put()
def submit_project( title, image, image_mime, budget_worksheet, budget_worksheet_mime, budget_range, development_sector, country_ids=[], brief_abstract='', long_abstract='', high_impact_description='', sustainability_description='', innovation_description='', budget_description='', budget_notes='', ): project = Project() project.State = ProjectStates.Pending project.Title = title project.BriefAbstract = brief_abstract project.LongAbstract = long_abstract project.HighImpactDescription = high_impact_description project.SustainabilityDescription = sustainability_description project.InnovationDescription = innovation_description project.BudgetDescription = budget_description project.BudgetNotes = budget_notes project.Image = to_blob(image) project.ImageMime = image_mime project.BudgetWorksheet = to_blob(budget_worksheet) project.BudgetWorksheetMime = budget_worksheet_mime project.Countries = country_ids project.BudgetRange = to_key(budget_range) project.DevelopmentSector = to_key(development_sector) project.put()