X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e977b7baf9a6e653d6040e9487b7a6cb5fda5fa2..01e221c6dc122a8a930fd7b83bf123ae02a2ef0d:/apps/suggest/views.py?ds=inline diff --git a/apps/suggest/views.py b/apps/suggest/views.py index 9b3de55d5..1fcb3363d 100644 --- a/apps/suggest/views.py +++ b/apps/suggest/views.py @@ -9,6 +9,7 @@ from django.http import HttpResponse, HttpResponseRedirect from django.utils.translation import ugettext as _ from django.views.decorators import cache from django.views.decorators.http import require_POST +from django.contrib.sites.models import Site from suggest import forms from suggest.models import Suggestion @@ -33,14 +34,15 @@ def report(request): mail_managers(u'Nowa sugestia na stronie WolneLektury.pl', u'''\ Zgłoszono nową sugestię w serwisie WolneLektury.pl. -%(url)s +http://%(site)s%(url)s Użytkownik: %(user)s Kontakt: %(contact)s %(description)s''' % { + 'site': Site.objects.get_current().domain, 'url': reverse('admin:suggest_suggestion_change', args=[suggestion.id]), - 'user': str(request.user), + 'user': str(request.user) if request.user.is_authenticated() else '', 'contact': contact, 'description': description, }, fail_silently=True)