Helpers App

Decorators

helpers.decorators.validate_subdomain(view_func)[source]

Validates subdomain, redirecting user to index iof the school is invalid.

Mixins

class helpers.mixins.CsrfExemptSessionAuthentication[source]
enforce_csrf(request)[source]

Enforce CSRF validation for session based authentication.

class helpers.mixins.FeatureFlowView(**kwargs)[source]

Template that handles GET requests by rendering the homepage. Feature_name or get_feature_flow() can be overridden to launch a feature or action on homepage load.

get_feature_flow(request, *args, **kwargs)[source]

Return data needed for the feature flow for this HomeView. A name value is automatically added in .get() using the feature_name class variable. A semester value can also be provided, which will change the initial semester state of the home page.

class helpers.mixins.RedirectToSignupMixin[source]
class helpers.mixins.ValidateSubdomainMixin[source]

Mixin which validates subdomain, redirecting user to index if the school is not in ACTIVE_SCHOOLS.