Новый дизайн грамот для пользователей

remotes/origin/feature/landing-registration
gzbender 6 years ago
parent 808647745e
commit d08fe1be3f
  1. 4
      apps/notification/tasks.py
  2. 3
      apps/notification/templates/notification/email/certificate.html
  3. 2
      project/settings.py
  4. BIN
      web/src/img/signed-user-certificates/1.jpg
  5. BIN
      web/src/img/signed-user-certificates/2.jpg
  6. BIN
      web/src/img/signed-user-certificates/3.jpg
  7. BIN
      web/src/img/signed-user-certificates/4.jpg
  8. BIN
      web/src/img/signed-user-certificates/5.jpg
  9. BIN
      web/src/img/signed-user-certificates/6.jpg
  10. BIN
      web/src/img/signed-user-certificates/7.jpg
  11. BIN
      web/src/img/signed-user-certificates/8.jpg
  12. BIN
      web/src/img/signed-user-certificates/9.jpg

@ -92,12 +92,12 @@ def send_certificates(email=None, date_end=None, dry_run=False):
for child in un.user.childs.all():
file_names.append(draw_cert(fn, un.user.email, child.first_name, child.last_name))
else:
file_names.append(staticfiles_storage.path(path_pattern % un.certificate_number))
file_names.append(staticfiles_storage.path(signed_path_pattern % un.certificate_number))
files = [open(fn, 'rb') for fn in file_names]
try:
send_email('Грамота от Lil School', un.user.email, 'notification/email/certificate.html',
attachments=[(f.name, f.read(), 'image/jpeg') for f in files], user_notification=un,
many_childs=un.user.childs.all().count() > 1)
many_childs=un.user.childs.all().count() > 1, child_filled=un.user.child_filled)
except:
print('Not OK')
continue

@ -6,7 +6,8 @@
{% if not user_notification or user_notification.certificate_number == 1 %}
<p>
Поздравляем! Вы прошли месяц обучения в Lil School.<br>
К письму {% if many_childs %}прикреплены грамоты. Распечатайте их{% else %}прикреплена грамота. Распечатайте её{% endif %} и вручите вашим детям.<br>
К письму {% if many_childs %}прикреплены грамоты. Распечатайте их и вручите вашим детям.
{% else %}прикреплена грамота. Распечатайте её{% if not child_filled %}, подпишите{% endif %} и вручите вашему ребенку.{% endif %}<br>
Ждём вас в следующем месяце на наших творческих занятиях!
</p>
{% endif %}

@ -329,7 +329,7 @@ CELERY_BEAT_SCHEDULE = {
},
'send_certificates': {
'task': 'apps.notification.tasks.send_certificates',
'schedule': crontab(minute=0, hour=21),
'schedule': crontab(minute=0, hour=19),
'args': (),
},
'sendgrid_update_recipients': {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 987 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Loading…
Cancel
Save