Re: TypeError: __init__() got an unexpected keyword argument 'Null'

1,202 views
Skip to first unread message

Jorge Gimeno

unread,
May 20, 2020, 8:27:10 PM5/20/20
to django...@googlegroups.com
Similar to keys in a dictionary, keyword argument names are case sensitive.  Try to pass in the lowercase version 'null':

    Raison_Non_Delivery_cd = models.ForeignKey(Raison, on_delete=models.CASCADE, related_name='raisonNonDelivery', null=True)

-Jorge

On Wed, May 20, 2020 at 5:05 PM hajar <hajar...@gmail.com> wrote:

hello django users , I hope u r doing well ! 


why can't I use Null in this case of foreign key , I hope you can see the picture below that's my class and the error 



err.png


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce736614-3ff9-47fa-885d-3f5b87160291%40googlegroups.com.

Samsul Islam

unread,
May 21, 2020, 9:50:30 AM5/21/20
to Django users
null=True


On Thursday, May 21, 2020 at 6:27:10 AM UTC+6, jlgimeno71 wrote:
Similar to keys in a dictionary, keyword argument names are case sensitive.  Try to pass in the lowercase version 'null':

    Raison_Non_Delivery_cd = models.ForeignKey(Raison, on_delete=models.CASCADE, related_name='raisonNonDelivery', null=True)

-Jorge

On Wed, May 20, 2020 at 5:05 PM hajar <hajar...@gmail.com> wrote:

hello django users , I hope u r doing well ! 


why can't I use Null in this case of foreign key , I hope you can see the picture below that's my class and the error 



err.png


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages