foreign key is not working

31 views
Skip to first unread message

amit pant

unread,
Oct 31, 2018, 7:45:53 AM10/31/18
to Django users
i used foreign key for make relationship between two model class but it does not work properly, i used this for make subscription and on first model their is choices for subscription.
help me why it is not working

Mahendra Rana

unread,
Oct 31, 2018, 7:54:04 AM10/31/18
to Django users
Where is model codes?

Paras Patidar

unread,
Oct 31, 2018, 7:59:03 AM10/31/18
to django...@googlegroups.com
Use:
on_delete = models.CASCADE
In Foreign Key

On Wed 31 Oct, 2018, 5:15 PM amit pant, <amitp...@gmail.com> wrote:
i used foreign key for make relationship between two model class but it does not work properly, i used this for make subscription and on first model their is choices for subscription.
help me why it is not working

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ccb94b40-2c2d-4202-bfb9-37459770b99a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

amit pant

unread,
Nov 2, 2018, 12:44:38 AM11/2/18
to django...@googlegroups.com
i used all method which is on docs but still it's not working properly.
 i am using django 2 with pyhton 3


ansh srivastav

unread,
Nov 2, 2018, 4:18:26 AM11/2/18
to django...@googlegroups.com
Where is model codes?  


Mailtrack Sender notified by
Mailtrack 11/02/18, 1:47:40 PM

Nelson Varela

unread,
Nov 2, 2018, 10:39:19 AM11/2/18
to Django users
Please do add some code so we can see what is going wrong
Reply all
Reply to author
Forward
0 new messages