feat: search in community page
This commit is contained in:
17
school/www/community/index.py
Normal file
17
school/www/community/index.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
context.user_count = frappe.db.count("User", {"enabled": True})
|
||||
users = frappe.get_all("User",
|
||||
{"enabled": True},
|
||||
pluck="name",
|
||||
start=0,
|
||||
page_length=30,
|
||||
order_by="creation desc")
|
||||
|
||||
user_details = []
|
||||
for user in users:
|
||||
details = frappe.get_doc("User", user)
|
||||
user_details.append(details)
|
||||
|
||||
context.user_details = user_details
|
||||
Reference in New Issue
Block a user