DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
django check if related object is None
def has_related_object(self): return hasattr(self, 'customers') and self.car is not None
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#django
#check
#related
#object
#None
ADD COMMENT
Topic
COMMENT
Name
8+7 =
Submit