Skip to content

Commit

Permalink
Controller with database queries
Browse files Browse the repository at this point in the history
  • Loading branch information
hsrai authored Nov 26, 2023
1 parent eb14dad commit 720b48d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ORM/raiMe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE

import frappe
import frappe.www.list
from frappe import _

no_cache = 1
startRecord = 0;
pageLength = 25;

def get_context(context):
context.current_user = frappe.get_doc("User", frappe.session.user)
context.show_sidebar = False
context.Rai = frappe.get_all('Program',
filters={'department': ['like', '%eachin%']},
fields=['name'],
order_by='name asc',
start=startRecord,
page_length=pageLength,
as_list=True)

0 comments on commit 720b48d

Please sign in to comment.