Why we add comma at the end of every URL in URL patterns in DJANGO and other thing is what is FORIEGNKEY | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we add comma at the end of every URL in URL patterns in DJANGO and other thing is what is FORIEGNKEY

11th Oct 2019, 12:26 PM
Nikhil Tale
Nikhil Tale - avatar
2 Answers
+ 1
Basically URL patterns is a list. So it's not necessary to add comma after last list item. But if it's a tuple you need to append comma after last item.
15th Apr 2021, 10:05 PM
patilkrunal
patilkrunal - avatar
+ 1
Foreign key is basically a column in database which is used to reference primary key of other table and access the other whole tables records easily in current table. There can be many foreign keys in a table
15th Apr 2021, 10:08 PM
patilkrunal
patilkrunal - avatar