| marp | theme | paginate | $size | backgroundColor |
|---|---|---|---|---|
true |
gaia |
true |
14580 |
Moderator: Javier Buzzi
Model.objects.create(property1=value1, property2=value2)m = Model(property1=value1, property2=value2)
m.save()- Whats happening under the hood?
- Whats happens to the related objects?
- What happens if the object is already in the database?
m.refresh_from_db()- Whats happening under the hood?
- Whats happens to the related objects?
- What happens if the object is not in the database?
m.delete()Model.objects.filter(id=m.id).delete()- Whats happening under the hood?
- Whats happens to the related objects?
- What happens if the object is not in the database?
m._state- Whats happening under the hood?
- Why is it important?
- What happens if it's
m.pkisNoneandm._state.addingisFalse?
Thank you!