I'm currently trying to call a class based Generic view from within another class based generic view and cant seem to do it correctly.
Ways I've tried:
result = CategoryTypes.as_view() # The same way you put it in the urlconf
print result
Prints: <function CategoryTypes at 0x92bd924>
CategoryTypes.as_view()(self.request)
# &
CategoryTypes().dispatch(self.request)
Tracebacks:
ContentNotRenderedError at /crm/categories/company/ The response content must be rendered before it can be accessed.
result = CategoryTypes().__init__()
print result
Prints: None
How do I call this from another view? I've seriously tried every method in the class and way of calling it I can think of.