On 4/21/07, James <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> "datasource  = models.ForeignKey(DataSource)"
>
> I tried changing the fixture line to "datasource": "1", but this
> results in the stack trace below. Does anyone know how to set up this
> fixture properly?

Pretty close; what you're looking for is you're looking for
"datasouce": 1 . The foreign key is an integer, not a string.

The easiest way to check syntax like this is to use Django to produce
a fixture as an example; if you put some sample data into your
application and run ./manage.py dumpdata myapp (substituting the name
of your application as appropriate), you will see how Django expects
your data to be serialized.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to