Exemplo n.º 1
0
    def get_request_repr(self, request):
        if request is None:
            return repr(None)

        result = super(WeblateExceptionReporterFilter, self).get_request_repr(
            request
        )

        if 'django_language' in request.session:
            lang = request.session['django_language']
        else:
            lang = None

        if request.user.is_authenticated():
            user = request.user.username
        else:
            user = None

        return '%s\n\nLanguage: %s\nUser: %s\n\nVersions:\n%s' % (
            result,
            lang,
            user,
            get_versions_string()
        )
Exemplo n.º 2
0
 def handle(self, *args, **options):
     '''
     Prints versions of dependencies.
     '''
     print get_versions_string()