Replace `get_common_context` with a mixin class.