from molo.profiles.forms import RegistrationForm
from molo.profiles.forms import EditProfileForm, ProfilePasswordChangeForm


def default_forms(request):
    return {
        'registration_form': RegistrationForm(),
        'edit_profile_form': EditProfileForm(),
        'password_change_form': ProfilePasswordChangeForm()
    }

# TODO: remove this context processor


def detect_freebasics(request):
    return {
        'is_via_freebasics':
            'Internet.org' in request.META.get('HTTP_VIA', '') or
            'InternetOrgApp' in request.META.get('HTTP_USER_AGENT', '') or
            'true' in request.META.get('HTTP_X_IORG_FBS', '')
    }

from molo.profiles.forms import ProfilePasswordChangeForm


def default_forms(request):
    return {
        'password_change_form': ProfilePasswordChangeForm()
    }

# TODO: remove this context processor


def detect_freebasics(request):
    return {
        'is_via_freebasics':
            'Internet.org' in request.META.get('HTTP_VIA', '') or
            'InternetOrgApp' in request.META.get('HTTP_USER_AGENT', '') or
            'true' in request.META.get('HTTP_X_IORG_FBS', '')
    }

Remove unused forms from context processor
Remove unused forms from context processor

These forms are not used by any view or template. On every request
Django is generating the entire HTML form for these 2 forms which
is a whole load of unnecessary CPU.
