toastdriven/django-tastypie — pull request #540 by elmit (2012-06-21 13:38:04+00:00)
Title: Problem with ForeignKey form validation.

If you try to validate form with ForeignKey like this:

```python

class CitationResource(BaseResource):
book = fields.ForeignKey('api.resource.books.BookResource', 'book')
part = fields.CharField(attribute='part', default=None)

class Meta:
fields = ['book', 'part']
queryset = Citation.objects.all()
validation = FormValidation(form_class=CitationForm)

class CitationForm(forms.ModelForm):
class Meta:
model = Citation

```

We have error in book field, because self.data['book'] == '/api/book/1', not Book object.
This path solve this problem.

PS. Sorry for my english ;(