Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get_type_display

def get_type(self):    return [i[1] for i in Item._meta.get_field('type').choices if i[0] == self.type][0]
Source by codehunter.cc #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+6 =