<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inactive_response(self, request):
 """ Return an inactive message. """

        inactive_url = getattr(settings, 'LOGIN_INACTIVE_REDIRECT_URL', '')
        if inactive_url:
            return HttpResponseRedirect(inactive_url)
        else:
            return self.error_to_response(request, {'error': _("This user account is marked as inactive.")})