Skip to content

Commit

Permalink
feat: deprecate promo gift name in favor of name plus condition
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanzh committed Feb 21, 2024
1 parent 0919952 commit 363f67c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ debug
deploy
venv
static/promo.jpg
config.cfg

*.pyc

2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _read_promodes_from_config(self, path):

promo_dict['discount_code'] = cfg.get('promocode.discount', 'code').upper()
promo_dict['gift_code'] = cfg.get('promocode.gift', 'code').upper()
promo_dict['gift_name'] = cfg.get('promocode.gift', 'name')
promo_dict['gift_name_and_condition'] = cfg.get('promocode.gift', 'name_and_condition')
promo_dict['gift_duration'] = cfg.get('promocode.gift', 'duration')

# TODO: Log this instead of printing to stdout.
Expand Down
2 changes: 1 addition & 1 deletion templates/promo.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2>Промокод на скидку</h2>
</section>
<section class='content-block surface'>
<h2>Промокод на подарок</h2>
<p>{{ gift_name }} к каждому заказу в интернет-магазине {{ ruquotes('Чистая Линия') }}.</p>
<p>{{ gift_name_and_condition }} в интернет-магазине {{ ruquotes('Чистая Линия') }}.</p>
<div class='promocode'>
{{ copybutton(gift_code) }}
<span class='promocode-duration'>Действует с {{ gift_duration }}.</span>
Expand Down

0 comments on commit 363f67c

Please sign in to comment.