this post was submitted on 02 Nov 2023
9 points (100.0% liked)
Django
407 readers
2 users here now
Django Project
- Django Project, the web framework for perfectionists with deadlines
- Django Code of Conduct
- Django Documentation
- Django Blog/News
- Support Django
Django Community
- Discord
- Project forum
- StackOverflow
- #django IRC Channel
- Django Users mailing list
- Django Developers mailing list
- Jazzband, a community maintaining Python projects
Django Ecosystem
Jobs
Learning/Docs
- Django Project tutorial
- Django Girls Tutorial
- Django Packages
- Classy Class-Based Views
- Classy Django REST Framework
- Classy DB
Podcasts:
Related Fediverse communities
- #django on Mastodon
- c/Python on programming.dev
- c/PostgreSQL on programming.dev
Feeds
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Maybe I'm dumb, but I can't seem to grasp what Models.CASCADE does. It didn't pop up with a definition in either the article, or the Django 4.2 docs.
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.