@frappe.whitelist()
def getdoctype(doctype, with_parent=False, cached_timestamp=None):
 docs = []
 parent_dt = None
 if with_parent:
  parent_dt = frappe.model.meta.get_parent_dt(doctype)
  if parent_dt:
   docs = get_meta_bundle(parent_dt)
   frappe.response[u'parent_dt'] = parent_dt
 if (not docs):
  docs = get_meta_bundle(doctype)
 frappe.response[u'user_permissions'] = get_user_permissions(docs)
 frappe.response[u'list_settings'] = get_list_settings((parent_dt or doctype))
 if (cached_timestamp and (docs[0].modified == cached_timestamp)):
  return u'use_cache'
 frappe.response.docs.extend(docs)

@ frappe . whitelist ( ) def getdoctype ( doctype , with_parent = False , cached_timestamp = None ) : docs = [ ] parent_dt = None if with_parent : parent_dt = frappe . model . meta . get_parent_dt ( doctype ) if parent_dt : docs = get_meta_bundle ( parent_dt ) frappe . response [ u'parent_dt' ] = parent_dt if ( not docs ) : docs = get_meta_bundle ( doctype ) frappe . response [ u'user_permissions' ] = get_user_permissions ( docs ) frappe . response [ u'list_settings' ] = get_list_settings ( ( parent_dt or doctype ) ) if ( cached_timestamp and ( docs [ 0 ] . modified == cached_timestamp ) ) : return u'use_cache' frappe . response . docs . extend ( docs )
load doctype .