feat: search in community page

This commit is contained in:
Jannat Patel
2022-01-06 17:10:07 +05:30
parent 2ec6a06204
commit e1e7354d85
14 changed files with 239 additions and 55 deletions

View 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