Commit b73febad authored by Benjamin Sonntag's avatar Benjamin Sonntag
Browse files

merge of local changes

parent b8959dec
[extractors] [extractors]
django = babeldjango.extract:extract_django django = babeldjango.extract:extract_django
[django: templates/**.*] [django: templates/*.*]
[django: templates/comments/*.*]
[python: bt/**.py] [python: bt/**.py]
...@@ -31,6 +31,7 @@ COUNTRIES = ( ...@@ -31,6 +31,7 @@ COUNTRIES = (
('FI', _('Finland')), ('FI', _('Finland')),
('SE', _('Sweden')), ('SE', _('Sweden')),
('UK', _('United Kingdom ')), ('UK', _('United Kingdom ')),
('NO', _('Norway')),
) )
RESOURCES = ( RESOURCES = (
......
...@@ -51,8 +51,8 @@ def activate(request): ...@@ -51,8 +51,8 @@ def activate(request):
if v: if v:
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest() actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
to=[x.email for x in User.objects.filter(groups__name='moderator')] to=[x.email for x in User.objects.filter(groups__name='moderator')]
msg = MIMEText(_("A new report was submitted. To approve click here: %s/moderate/?key=%s\n") % (settings.ROOT_URL or 'http://localhost:8001/', actid)) msg = MIMEText(_("A new report was submitted. To approve click here: %s/moderate/?key=%s\n") % (settings.ROOT_URL or 'http://localhost:8001/', actid), _charset="utf-8")
msg['Subject'] = _('NNMon submission approval') msg['Subject'] = _('NNMon submission approval').encode("Utf-8")
msg['From'] = 'nnmon@nnmon.lqdn.fr' msg['From'] = 'nnmon@nnmon.lqdn.fr'
msg['To'] = ', '.join(to) msg['To'] = ', '.join(to)
s = smtplib.SMTP('localhost') s = smtplib.SMTP('localhost')
...@@ -60,7 +60,7 @@ def activate(request): ...@@ -60,7 +60,7 @@ def activate(request):
s.quit() s.quit()
v.activationid=actid v.activationid=actid
v.save() v.save()
messages.add_message(request, messages.INFO, _('Thank you for verifying your submission. It will be listed shortly, after we\'ve checked that the report is valid.')) messages.add_message(request, messages.INFO, _('Thank you for verifying your submission. It will be listed shortly, after we\'ve checked that the report is valid.').encode("Utf-8"))
return HttpResponseRedirect('/') # Redirect after POST return HttpResponseRedirect('/') # Redirect after POST
def moderate(request): def moderate(request):
...@@ -106,8 +106,8 @@ def confirm(request, id, name=None): ...@@ -106,8 +106,8 @@ def confirm(request, id, name=None):
def sendverifymail(service,to): def sendverifymail(service,to):
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest() actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
msg = MIMEText(_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.") % (settings.ROOT_URL or 'http://localhost:8001/', service, actid)) msg = MIMEText(_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.") % (settings.ROOT_URL or 'http://localhost:8001/', service, actid), _charset="utf-8")
msg['Subject'] = _('NNMon submission verification') msg['Subject'] = _('NNMon submission verification').encode("Utf-8")
msg['From'] = 'nnmon@nnmon.lqdn.fr' msg['From'] = 'nnmon@nnmon.lqdn.fr'
msg['To'] = to msg['To'] = to
s = smtplib.SMTP('localhost') s = smtplib.SMTP('localhost')
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment