

def activate(request, activation_key, template_name='registration/activate.html', extra_context=None):
    "\n    Activate a ``User``'s account from an activation key, if their key\n    is valid and hasn't expired.\n    \n    By default, use the template ``registration/activate.html``; to\n    change this, pass the name of a template as the keyword argument\n    ``template_name``.\n    \n    **Required arguments**\n    \n    ``activation_key``\n       The activation key to validate and use for activating the\n       ``User``.\n    \n    **Optional arguments**\n       \n    ``extra_context``\n        A dictionary of variables to add to the template context. Any\n        callable object in this dictionary will be called to produce\n        the end result which appears in the context.\n    \n    ``template_name``\n        A custom template to use.\n    \n    **Context:**\n    \n    ``account``\n        The ``User`` object corresponding to the account, if the\n        activation was successful. ``False`` if the activation was not\n        successful.\n    \n    ``expiration_days``\n        The number of days for which activation keys stay valid after\n        registration.\n    \n    Any extra variables supplied in the ``extra_context`` argument\n    (see above).\n    \n    **Template:**\n    \n    registration/activate.html or ``template_name`` keyword argument.\n    \n    "
    activation_key = activation_key.lower()
    account = RegistrationProfile.objects.activate_user(activation_key)
    if (extra_context is None):
        extra_context = {
            
        }
    context = RequestContext(request)
    for (key, value) in extra_context.items():
        context[key] = ((callable(value) and request()) or value)
    return render_to_response(template_name, {
        'account': account,
        'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS,
    }, context_instance=context)

dataset/ETHPy150Open davemerwin/blue-channel/external_apps/registration/views.py activate/VarMisuse@92/563 `value`->`request`