diff options
| author | Dustin Farris | 2014-01-08 16:14:27 -0500 |
|---|---|---|
| committer | Dustin Farris | 2014-01-08 16:14:27 -0500 |
| commit | 52db4eadc204c3e5ec234729c24275c8ed803634 (patch) | |
| tree | cbd21d91b3f5633dd110acb571b7b29cfaa774b1 /rest_framework/tests/accounts/models.py | |
| parent | 05c396cfa15138b56bf8617f4667fc41e80be104 (diff) | |
| download | django-rest-framework-52db4eadc204c3e5ec234729c24275c8ed803634.tar.bz2 | |
Testing nested serializers with models that have str foreign key references.
Diffstat (limited to 'rest_framework/tests/accounts/models.py')
| -rw-r--r-- | rest_framework/tests/accounts/models.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rest_framework/tests/accounts/models.py b/rest_framework/tests/accounts/models.py new file mode 100644 index 00000000..525e601b --- /dev/null +++ b/rest_framework/tests/accounts/models.py @@ -0,0 +1,8 @@ +from django.db import models + +from rest_framework.tests.users.models import User + + +class Account(models.Model): + owner = models.ForeignKey(User, related_name='accounts_owned') + admins = models.ManyToManyField(User, blank=True, null=True, related_name='accounts_administered') |
