Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num ClassDef bases body Assign NameStore TupleLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases body Assign NameStore Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list NameLoad ClassDef bases AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list
N/A N/A 
Using a custom primary key

By default, Django adds an ``"id"`` field to each model. But you can override
this behavior by explicitly adding ``primary_key=True`` to a field.
 __future__ unicode_literals django.db models django.utils.encoding python_2_unicode_compatible fields MyAutoField Employee N/A N/A models Model N/A N/A employee_code N/A N/A models IntegerField primary_key True db_column code N/A first_name N/A N/A models CharField max_length 20 N/A last_name N/A N/A models CharField max_length 20 Meta N/A N/A N/A ordering N/A last_name first_name N/A __str__ 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 python_2_unicode_compatible Business N/A N/A models Model N/A N/A name N/A N/A models CharField max_length 20 primary_key True N/A employees N/A N/A models ManyToManyField Employee Meta N/A N/A N/A verbose_name_plural businesses N/A __str__ N/A N/A self N/A N/A N/A N/A self name N/A N/A python_2_unicode_compatible Bar N/A N/A models Model N/A N/A id N/A MyAutoField primary_key True db_index True __str__ N/A N/A self N/A N/A N/A N/A repr N/A self pk N/A N/A python_2_unicode_compatible Foo N/A N/A models Model N/A N/A bar N/A N/A models ForeignKey Bar N/A models CASCADE N/A