I'm doing a plugin and I have a few events like this one:
gulp test
Also a $(window).on('load resize', function(event) {
_plugin.methodCall();
});
event. How do I unbind these in my destroy function without messing other user-defined events?
Or is it better to get creative with custom events?
答案 0 :(得分:1)
You can use jQuery .off in combination with namespaces when attaching event with from django.db.models import Max
Model.objects.filter(user_id=100).values('object_id').annotate(Max('id'))
".on"