def get_metaschemas(*args, **kwargs):
 count = request.args.get('count', 100)
 include = request.args.get('include', 'latest')
 meta_schemas = []
 if (include == 'latest'):
  schema_names = list(MetaSchema.objects.all().values_list('name', flat=True).distinct())
  for name in schema_names:
   meta_schema_set = MetaSchema.find((Q('name', 'eq', name) & Q('schema_version', 'eq', 2)))
   meta_schemas = (meta_schemas + [s for s in meta_schema_set])
 else:
  meta_schemas = MetaSchema.find()
 meta_schemas = [schema for schema in meta_schemas if (schema.name in ACTIVE_META_SCHEMAS)]
 meta_schemas.sort(key=(lambda a: ACTIVE_META_SCHEMAS.index(a.name)))
 return ({'meta_schemas': [serialize_meta_schema(ms) for ms in meta_schemas[:count]]}, http.OK)

def get_metaschemas ( * args , ** kwargs ) : count = request . args . get ( 'count' , 100 ) include = request . args . get ( 'include' , 'latest' ) meta_schemas = [ ] if ( include == 'latest' ) : schema_names = list ( MetaSchema . objects . all ( ) . values_list ( 'name' , flat = True ) . distinct ( ) ) for name in schema_names : meta_schema_set = MetaSchema . find ( ( Q ( 'name' , 'eq' , name ) & Q ( 'schema_version' , 'eq' , 2 ) ) ) meta_schemas = ( meta_schemas + [ s for s in meta_schema_set ] ) else : meta_schemas = MetaSchema . find ( ) meta_schemas = [ schema for schema in meta_schemas if ( schema . name in ACTIVE_META_SCHEMAS ) ] meta_schemas . sort ( key = ( lambda a : ACTIVE_META_SCHEMAS . index ( a . name ) ) ) return ( { 'meta_schemas' : [ serialize_meta_schema ( ms ) for ms in meta_schemas [ : count ] ] } , http . OK )
list metaschemas with which a draft registration may be created .