Luis Norambuena@programming.devM to Django@programming.devEnglish · 1 year agoNew goodies in Django 5.0fly.ioexternal-linkmessage-square3fedilinkarrow-up18arrow-down10file-textcross-posted to: django@programming.devdjango@programming.dev
arrow-up18arrow-down1external-linkNew goodies in Django 5.0fly.ioLuis Norambuena@programming.devM to Django@programming.devEnglish · 1 year agomessage-square3fedilinkfile-textcross-posted to: django@programming.devdjango@programming.dev
minus-squareLuis Norambuena@programming.devOPMlinkfedilinkEnglisharrow-up2·edit-21 year agoLook at ForeignKey -> Arguments: https://docs.djangoproject.com/en/4.2/ref/models/fields/#arguments In the sample in the linked page, deleting a Person object would also delete Order object/s linked to that particular person via the ForeignKey edit: although the syntax is usually on_delete=models.CASCADE
Look at ForeignKey -> Arguments: https://docs.djangoproject.com/en/4.2/ref/models/fields/#arguments
In the sample in the linked page, deleting a
Person
object would also deleteOrder
object/s linked to that particular person via the ForeignKeyedit: although the syntax is usually
on_delete=models.CASCADE
Fucking derp. I’m dumb.