Added portal pages for courses and topics.
This commit is contained in:
13
community/www/courses/index.py
Normal file
13
community/www/courses/index.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
context.no_cache = 1
|
||||
context.courses = get_courses()
|
||||
|
||||
def get_courses():
|
||||
courses = frappe.get_all(
|
||||
"Community Course",
|
||||
fields=['name', 'title', 'description']
|
||||
)
|
||||
print(courses)
|
||||
return courses
|
||||
Reference in New Issue
Block a user