| 787 | | Note, however, that you can only use strings to refer to models in the same |
|---|
| 788 | | models.py file -- you cannot use a string to reference a model in a different |
|---|
| 789 | | application, or to reference a model that has been imported from elsewhere. |
|---|
| | 787 | Note, however, that this only refers to models in the same models.py file -- you |
|---|
| | 788 | cannot use a string to reference a model defined in another application or |
|---|
| | 789 | imported from elsewhere. |
|---|
| | 790 | |
|---|
| | 791 | **New in Django development version:** to refer to models defined in another |
|---|
| | 792 | application, you must instead explicitially specify the application label. That |
|---|
| | 793 | is, if the ``Manufacturer`` model above is defined in another application called |
|---|
| | 794 | ``production``, you'd need to use:: |
|---|
| | 795 | |
|---|
| | 796 | class Car(models.Model): |
|---|
| | 797 | manufacturer = models.ForeignKey('production.Manufacturer') |
|---|