Refactor context setting to reduce duplication and remove unnecessary helper functions
Refactor context setting to reduce duplication and remove unnecessary helper functions

thenewguy/wagtail,mixxorz/wagtail,wagtail/wagtail,mixxorz/wagtail,thenewguy/wagtail,rsalmaso/wagtail,wagtail/wagtail,zerolab/wagtail,zerolab/wagtail,torchbox/wagtail,thenewguy/wagtail,jnns/wagtail,jnns/wagtail,mixxorz/wagtail,jnns/wagtail,rsalmaso/wagtail,wagtail/wagtail,rsalmaso/wagtail,torchbox/wagtail,zerolab/wagtail,mixxorz/wagtail,zerolab/wagtail,gasman/wagtail,zerolab/wagtail,gasman/wagtail,thenewguy/wagtail,torchbox/wagtail,rsalmaso/wagtail,jnns/wagtail,rsalmaso/wagtail,torchbox/wagtail,gasman/wagtail,thenewguy/wagtail,gasman/wagtail,gasman/wagtail,wagtail/wagtail,mixxorz/wagtail,wagtail/wagtail