Fix some paths
This commit is contained in:
+5
-4
@@ -11,6 +11,7 @@ from django.core.mail import send_mail
|
||||
import logging
|
||||
import requests
|
||||
from dealer.git import git
|
||||
from sikweb.settings import URL
|
||||
|
||||
from members.views.utils import *
|
||||
from kaehmy.models import Application, CustomRole, PresetRole, TelegramChannel
|
||||
@@ -60,12 +61,12 @@ def comment(request, *args, **kwargs):
|
||||
name = comment.name
|
||||
|
||||
subject = 'Kaehmyysi tai kommenttiisi on vastattu!'
|
||||
body = ('{} on vastannut kaehmyhakemukseesi tai kommenttiisi kaehmypalvelussa.\r\n\r\n'
|
||||
'Käy lukemassa viesti osoitteessa http://sika.sahkoinsinoorikilta.fi/kaehmy').format(name.capitalize())
|
||||
body = (f'{name.capitalize()} on vastannut kaehmyhakemukseesi tai kommenttiisi kaehmypalvelussa.\r\n\r\n'
|
||||
'Käy lukemassa viesti osoitteessa https://{URL}/kaehmy')
|
||||
|
||||
send_email(email, subject, body)
|
||||
logging.debug(
|
||||
'Sent kaehmy comment email to recipient <{}>'.format(email))
|
||||
f'Sent kaehmy comment email to recipient <{email}>')
|
||||
|
||||
return redirect('/kaehmy')
|
||||
else:
|
||||
@@ -123,7 +124,7 @@ def submit(request, *args, **kwargs):
|
||||
custom_role.save()
|
||||
application.custom_roles.add(custom_role)
|
||||
|
||||
url = 'https://sika.sahkoinsinoorikilta.fi/kaehmy'
|
||||
url = f'https://{URL}/kaehmy'
|
||||
|
||||
email = form.cleaned_data.get('email', '')
|
||||
name = form.cleaned_data.get('name', 'Anonymous')
|
||||
|
||||
Reference in New Issue
Block a user