рисовальный лагерь

remotes/origin/hotfix/delete-image-error-30-05-19
gzbender 7 years ago
parent 1f08e948ff
commit 0910f44a53
  1. 15
      apps/notification/tasks.py
  2. BIN
      web/src/img/camp-certificates/1.jpg
  3. BIN
      web/src/img/camp-certificates/2.jpg
  4. BIN
      web/src/img/camp-certificates/3.jpg
  5. BIN
      web/src/img/signed-camp-certificates/1.jpg
  6. BIN
      web/src/img/signed-camp-certificates/2.jpg
  7. BIN
      web/src/img/signed-camp-certificates/3.jpg
  8. 8
      web/webpack.config.js

@ -165,14 +165,17 @@ def send_child_birthday_email_and_bonuses():
@app.task
def send_camp_certificates(email=None, dry_run=False, certificate_number=None):
path_pattern = 'img/camp-certificates/%d.jpg'
color = (35, 59, 227)
signed_path_pattern = 'img/signed-camp-certificates/%d.jpg'
color = (0, 27, 94)
if certificate_number is None:
certificate_number = 1
if certificate_number == 2:
color = (0, 27, 94)
color = (106, 5, 163)
if certificate_number == 3:
color = (24, 57, 220)
if email:
fn = draw_cert(staticfiles_storage.path(path_pattern % certificate_number), email, 'Имя', 'Фамилия',
font_size=70, y=550, color=color)
fn = draw_cert(staticfiles_storage.path(signed_path_pattern % certificate_number), email, 'Имя', 'Фамилия',
font_size=120, y=1000, color=color)
file = open(fn, 'rb')
try:
pass
@ -203,9 +206,9 @@ def send_camp_certificates(email=None, dry_run=False, certificate_number=None):
continue
if un.user.child_first_name:
fn = staticfiles_storage.path(path_pattern % certificate_number)
fn = staticfiles_storage.path(signed_path_pattern % certificate_number)
fn = draw_cert(fn, un.user.email, un.user.child_first_name, un.user.child_last_name,
font_size=70, y=550, color=color)
font_size=120, y=1000, color=color)
else:
fn = staticfiles_storage.path(path_pattern % certificate_number)
file = open(fn, 'rb')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@ -94,7 +94,8 @@ module.exports = {
test: /\.(png|gif|jpg|svg)$/,
exclude: [path.resolve(__dirname, 'src/icons'), path.resolve(__dirname, 'src/img/user-certificates'),
path.resolve(__dirname, 'src/img/gift-certificates'), path.resolve(__dirname, 'src/img/reviews'),
path.resolve(__dirname, 'src/img/signed-user-certificates'), path.resolve(__dirname, 'src/img/camp-certificates')],
path.resolve(__dirname, 'src/img/signed-user-certificates'), path.resolve(__dirname, 'src/img/camp-certificates'),
path.resolve(__dirname, 'src/img/signed-camp-certificates')],
loader: 'file-loader?name=[name].[ext]&outputPath=./img/'
},
{
@ -117,6 +118,11 @@ module.exports = {
include: path.resolve(__dirname, 'src/img/camp-certificates'),
loader: 'file-loader?name=[name].[ext]&outputPath=./img/camp-certificates/'
},
{
test: /\.(png|jpg)$/,
include: path.resolve(__dirname, 'src/img/signed-camp-certificates'),
loader: 'file-loader?name=[name].[ext]&outputPath=./img/signed-camp-certificates/'
},
{
test: /\.(png|jpg)$/,
include: path.resolve(__dirname, 'src/img/reviews'),

Loading…
Cancel
Save