I came across a reddit post yesterday 
<https://www.reddit.com/r/django/comments/y7w5dm/django_async_delete_from_db/>about
 
`adelete` raising an attribute error

r = await mymodel.objects.aget(some_name=myname) 
await r.adelete()

would throw an `AttributeError`,

whereas r = await mymodel.objects.filter(some_name=myname).adelete() works 
as expected.

I was a little curious about this, and adelete 
<https://docs.djangoproject.com/en/4.1/ref/models/querysets/#django.db.models.query.QuerySet.adelete>
 is 
explicitly called out in the queryset docs within the `delete` section.  
but the models doc page  
<https://docs.djangoproject.com/en/4.1/ref/models/instances/#deleting-objects>only
 
contains items about `delete`.  Is this intentional or not, and if it is 
intentional, perhaps a specific call-out in both queryset and model delete 
sections would help with clarification.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/82ba40ef-ea73-4492-a2c3-448dbd1b9245n%40googlegroups.com.
  • Int... Jason Johns
    • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
      • ... Jason Johns
        • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
          • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
            • ... Jason Johns

Reply via email to