my_mood.interests.remove(my_interest)
Note: you might have to get an instance of my_mood
and my_interest
using Django’s QuerySet API before you can execute this code.
More Related Contents:
- Django – Cascade deletion in ManyToManyRelation
- How to use permission_required decorators on django class-based views
- Django Admin Show Image from Imagefield
- Django: Get model from string?
- Django: Get list of model fields?
- How do I get Django Admin to delete files when I remove an object from the database/model?
- Applying bootstrap styles to django forms
- Django ManyToMany filter()
- How do I deal with this race condition in django?
- Should I avoid multi-table (concrete) inheritance in Django by any means?
- Limit foreign key choices in select in an inline form in admin
- How do I insert a django form in twitter-bootstrap modal window?
- how to unit test file upload in django
- ImageField overwrite image file with same name
- Using Heroku for Django Media Files
- Django’s self.client.login(…) does not work in unit tests
- Django “xxxxxx Object” display customization in admin action sidebar
- Django: accessing the model instance from within ModelAdmin?
- How to install libpq-fe.h?
- Using Django auth UserAdmin for a custom user model
- List field in model?
- How to access outermost forloop.counter with nested for loops in Django templates?
- How to get URL of current page, including parameters, in a template?
- Django: show/log ORM sql calls from python shell
- Cannot find command ‘git’ – windows
- What is the right way to validate if an object exists in a django view without returning 404?
- How to use if/else condition on Django Templates?
- How to limit file types on file uploads for ModelForms with FileFields?
- Django/DRF – 405 Method not allowed on DELETE operation
- django : Serving static files through nginx