Re: [Django] #26664: Support of model_object.delete(cascade=True)

2016-05-27 Thread Django
#26664: Support of model_object.delete(cascade=True)
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by srkunze):

 Proposal on DevelopersMailingList: https://groups.google.com/forum/#!topic
 /django-developers/Rr0cX1ZEE-Y

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.3fc32dbda2eea3f844d1779cd58c9599%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26664: Support of model_object.delete(cascade=True)

2016-05-27 Thread Django
#26664: Support of model_object.delete(cascade=True)
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by srkunze):

 Hi Tim. I know that it might be dangerous. However, the reason why I
 suggest this feature is that we needed it in a backwards migration. I.e.
 it removes some data that has been created by its corresponding forward
 migration. In this case, we are 110% sure that it does not delete anything
 more than necessary.

 Overriding ```Model.delete()``` does not help in this case as it is NOT
 the original Model but a fake migration model.

 We already have a helper function that carries out this deletion manually
 but we thought that a Django-provided way would be much cleaner.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1b2320e151be1f85c6785956aae57e08%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26664: Support of model_object.delete(cascade=True)

2016-05-26 Thread Django
#26664: Support of model_object.delete(cascade=True)
-+-
 Reporter:  srkunze  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 This seems a bit dangerous to me. In particular, there's no way to control
 how far or to which relations the deletions will cascade. I think it's
 safer to explicitly handle the deletions in a use case like this. Of
 course, you can also override the `Model.delete()` method to have whatever
 behavior you like.

 If you can find consensus on the DevelopersMailingList to add something
 like this, I'll be happy to reopen the ticket.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.6a2c1cf543129580a037fa1482aecfc5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26664: Support of model_object.delete(cascade=True)

2016-05-25 Thread Django
#26664: Support of model_object.delete(cascade=True)
--+
 Reporter:  srkunze   |  Owner:  nobody
 Type:  New feature   | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 I couldn't find anything via the search on this topic (maybe because its
 keywords are too generic).

 Even though we have on_delete=PROTECTED on several models fields for a
 reason, there are circumstances where we want to circumvent this
 restriction also for a reason.

 Would this be valuable addition to django?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.5101fb88320fc55294e8dc5508e13f7b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.