You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1011 B
25 lines
1011 B
# coding=utf-8
|
|
import os
|
|
import django
|
|
import sys
|
|
|
|
sys.path.append("/var/www/projects/lms/")
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings")
|
|
django.setup()
|
|
from service.models import MailBox
|
|
|
|
for letter in MailBox.objects.filter(result=''):
|
|
letter.result = u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' \
|
|
u'<html>' \
|
|
u'<head>' \
|
|
u'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' \
|
|
u'<title></title>' \
|
|
u'</head>' \
|
|
u'<body>' \
|
|
u'<table width=100%>{0}' \
|
|
u'<tr><td style="padding-bottom: 20px;">С уважением,<Br>Точка кода</td></tr>' \
|
|
u'<tr><td style="padding-bottom: 20px;"><img src="http://lms.ru/static/img/logo.png"></td></tr>' \
|
|
u'</table>' \
|
|
u'</body>' \
|
|
u'</html>'.format(letter.text)
|
|
letter.save()
|
|
|