feat: hackathon and project web view

This commit is contained in:
pateljannat
2021-02-16 19:40:55 +05:30
parent 1d2bf00782
commit 72135d7a73
14 changed files with 482 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
from __future__ import unicode_literals
import frappe
from frappe import _
def get_context(context):
context.no_cache = 1
try:
hackathon = frappe.form_dict['hackathon']
except KeyError:
frappe.local.flags.redirect_location = '/hackathons'
raise frappe.Redirect
context.projects = get_hackathon_projects(hackathon)
context.hackathon = hackathon
def get_hackathon_projects(hackathon):
return frappe.get_all("Community Project", filters={"event":hackathon}, fields=["name", "project_short_intro"])