Django model proxy override save

37 views
Skip to first unread message

drifter

unread,
Nov 18, 2015, 5:59:07 AM11/18/15
to Django users
I want to override the save for a model when saved from the proxy I've tried commenting out as much as I can but it's still using the model save. Here's my code.

class MovieProxy(Movie):
    class Meta:
        verbose_name = 'movie show'
        proxy=True

    def save(self, *args, **kwargs):
        #super(MovieProxy, self).save(*args, **kwargs)
        fily = open('post-{0}'.format(self.id),'w')
        fily.write(*args)
        fily.write('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')
        fily.write(**kwargs)
        fily.close()
Reply all
Reply to author
Forward
0 new messages