Can we push this to a decorator? If/Else in a view gets difficult to maintain.