#NEWLINE# def direct_to_user_template( request , username , template_name , extra_context = None ) : #NEWLINE# #INDENT# "\n    Simple wrapper for Django's :func:`direct_to_template` view.\n\n    This view is used when you want to show a template to a specific user. A\n    wrapper for :func:`direct_to_template` where the template also has access to\n    the user that is found with ``username``. For ex. used after signup,\n    activation and confirmation of a new e-mail.\n\n    :param username:\n        String defining the username of the user that made the action.\n\n    :param template_name:\n        String defining the name of the template to use. Defaults to\n        ``userena/signup_complete.html``.\n\n    **Keyword arguments**\n\n    ``extra_context``\n        A dictionary containing extra variables that should be passed to the\n        rendered template. The ``account`` key is always the ``User``\n        that completed the action.\n\n    **Extra context**\n\n    ``viewed_user``\n        The currently :class:`User` that is viewed.\n\n    " #NEWLINE# user = get_object_or_404 ( get_user_model ( ) , username__iexact = username ) #NEWLINE# if ( not extra_context ) : #NEWLINE# #INDENT# extra_context = dict ( ) #NEWLINE# #UNINDENT# extra_context [ 'viewed_user' ] = user #NEWLINE# extra_context [ 'profile' ] = get_user_profile ( user = user ) #NEWLINE# return ExtraContextTemplateView . as_view ( template_name = template_name , extra_context = extra_context ) ( request )