How to save related fields (m2m) in Django's admin Django 14.02.2016

Simple snippet how to save (update) related fields

class MovieAdmin(admin.ModelAdmin):
    list_display = ('id', 'title')
    save_on_top = True

    def save_model(self, request, obj, form, change):
        obj.imbd = get_imbd()
        obj.save()

    def save_related(self, request, form, formsets, change):
        super(MovieAdmin, self).save_related(request, form, formsets, change)
        obj = form.instance
        if obj.comments.count() > 0:
            obj.comments_count = obj.comments.count()
            obj.save()