Module Expr Str ImportFrom alias alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num decorator_list
N/A N/A 
33. get_or_create()

``get_or_create()`` does what it says: it tries to look up an object with the
given parameters. If an object isn't found, it creates one with the given
parameters.
 django.db models IntegrityError Person N/A N/A models Model N/A N/A first_name N/A N/A models CharField max_length 100 N/A last_name N/A N/A models CharField max_length 100 N/A birthday N/A N/A models DateField __unicode__ N/A N/A self N/A N/A N/A N/A %s %s N/A N/A self first_name N/A self last_name N/A N/A ManualPrimaryKeyTest N/A N/A models Model N/A N/A id N/A N/A models IntegerField primary_key True N/A data N/A N/A models CharField max_length 100 N/A