add foreign key in model, not in database, but it can cause conflicts with
django.
anyway if you even want to do it reviews the documentation SQLite

2015-09-30 13:12 GMT-03:00 Gergely Polonkai <gerg...@polonkai.eu>:

> Assuming you are using Django and it's ORM, the same way as in any other
> database:
>
> fieldname = models.ForeignKey(AnotherModel)
> On 30 Sep 2015 15:18, "Bhanu Kathuria" <001kathuriabh...@gmail.com> wrote:
>
>>     I am using sqlite3 database.
>> How can I add foreign key between two tables.
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/56c957c9-6b03-4c19-9566-9a63cdbf8319%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/56c957c9-6b03-4c19-9566-9a63cdbf8319%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACczBUKyATKexddYKEMhKyg4SpywuyZ7uMxDK5HMXxadQV7vLg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACczBUKyATKexddYKEMhKyg4SpywuyZ7uMxDK5HMXxadQV7vLg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Ricardo Daniel Quiroga

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO2-wHabpERhmoJGGRYJWxOee%2BWpKNQUpEn9ciBJ59AfJezRGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to