Compare commits

...

2 Commits

Author SHA1 Message Date
6e6899ddbb Merge pull request 'Заменил settings.SITE_URL' (#27) from fix_test into main
Some checks failed
Auto-update README / update-readme (push) Has been cancelled
Reviewed-on: #27
2026-06-20 14:23:43 +03:00
NikDizell
33666035c4 Заменил settings.SITE_URL 2026-06-20 14:23:26 +03:00
2 changed files with 4 additions and 2 deletions

View File

@ -48,6 +48,8 @@ ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', 'localhost,127.0.0.1').split('
# Исключения для отслеживания
EXCLUDED_IPS = os.getenv('EXCLUDED_IPS', 'localhost,127.0.0.1').split(',')
SITE_URL = os.getenv('SITE_URL', 'https://nikdizell.ru')
# Важно для работы за прокси
if not DEBUG:
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

View File

@ -86,7 +86,7 @@ def send_new_article_notification(article_id):
subject = f'📰 Новая статья: {article.title}'
context = {
'article': article,
'site_url': settings.ALLOWED_HOSTS[0] if settings.ALLOWED_HOSTS else 'localhost',
'site_url': settings.SITE_URL,
'site_name': 'С.Н.А. Технологии',
}
html_message = render_to_string('emails/new_article_notification.html', context)
@ -128,7 +128,7 @@ def send_new_product_notification(product_id):
subject = f'🛒 Новый продукт: {product.title}'
context = {
'product': product,
'site_url': settings.ALLOWED_HOSTS[0] if settings.ALLOWED_HOSTS else 'localhost',
'site_url': settings.SITE_URL,
'site_name': 'С.Н.А. Технологии',
}
html_message = render_to_string('emails/new_product_notification.html', context)