ModelForm mixins

class thecut.authorship.forms.AuthorshipMixin(user, *args, **kwargs)[source]

Mixin for a ModelForm which sets created_by and updated_by fields for the instance when saved.

Requires that a User instance be passed in to the constructor. Views which utilise AuthorshipViewMixin handle this already.