mongoengine objectidfield

Solutions on MaxInterview for mongoengine objectidfield by the best coders in the world

showing results for - "mongoengine objectidfield"
Hannes
10 Sep 2016
1def scaffold_sortable_columns(self):
2    """
3        Return a dictionary of sortable columns (name, field)
4    """
5    columns = {}
6 
7    for n, f in self._get_model_fields():
8        if type(f) in SORTABLE_FIELDS:
9            if self.column_display_pk or type(f) != mongoengine.ObjectIdField:
10                columns[n] = f
11 
12    return columns
13