Ohh yes it's "null=True". Meant to say set field as None while using.

Eg:
class YourClass(models.Model):
    your_model_field = models.ForeignKey('RelatedModel', null=True)
    ...

instance = YourClass.objects.create(your_model_field=None, ...)

Thanks,
Subhranath Chunder.

On Mon, Jul 19, 2010 at 1:35 AM, Ramiro Morales <cra...@gmail.com> wrote:

> On Sun, Jul 18, 2010 at 4:33 PM, rmschne <rmsc...@gmail.com> wrote:
> > Thanks ... but where does "None=True" go?
>
> That should be null=True winn defining the ForeignKey field.
>
> See
>
> http://docs.djangoproject.com/en/1.2/topics/db/models/#field-options
>
> Please accept this humble suggestion:
>
> Reading the documentation from beginning to end once
> will help you a lot when beginning. It would be unfortunate
> to not take advantage of such a great body of documents.
> There are other projects where this is not possible
> because the docs are very basic. But this isnĀ“t the
> case with Django.
>
> Regards,
>
> --
> Ramiro Morales  |  http://rmorales.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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

Reply via email to