https://github.com/dfunckt/django-rules/blob/master/rules/contrib/views.py#L37
Using self.get_object
will introduce an error when using rules
on a view that inherits from CreateView
. This is because CreateView
does inherit SingleObjectMixin
and does have a get_object
callable, but it will throw an exception when its get_object
is called:
AttributeError: Generic detail view {InheritsFromCreateView} must be called with either an object pk or a slug.