- the slug is autogenerated from the title - the slug of a topic is unique among all the topics of that course
13 lines
255 B
Python
13 lines
255 B
Python
import frappe
|
|
|
|
def get_context(context):
|
|
context.no_cache = 1
|
|
context.courses = get_courses()
|
|
|
|
def get_courses():
|
|
courses = frappe.get_all(
|
|
"LMS Course",
|
|
fields=['name', 'slug', 'title', 'description']
|
|
)
|
|
return courses
|