mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-08-09 23:07:38 +02:00
* Fixed issue #29, thank you to Jason Nolen for reporting it. Prior
versions of Python used a different name for base64 functions, so a wrapper has been added to lib.py to enable both old- and new- style functions to be used.
This commit is contained in:
9
lib.py
9
lib.py
@ -8,6 +8,14 @@ lib.py - Common functions (eg multipart e-mail)
|
||||
|
||||
chart_colours = ('80C65A', '990066', 'FF9900', '3399CC', 'BBCCED', '3399CC', 'FFCC33')
|
||||
|
||||
try:
|
||||
from base64 import urlsafe_b64encode as b64encode
|
||||
except ImportError:
|
||||
from base64 import encodestring as b64encode
|
||||
try:
|
||||
from base64 import urlsafe_b64decode as b64decode
|
||||
except ImportError:
|
||||
from base64 import decodestring as b64decode
|
||||
|
||||
def send_templated_mail(template_name, email_context, recipients, sender=None, bcc=None, fail_silently=False, files=None):
|
||||
"""
|
||||
@ -327,3 +335,4 @@ def safe_template_context(ticket):
|
||||
context['ticket']['assigned_to'] = context['ticket']['_get_assigned_to']
|
||||
|
||||
return context
|
||||
|
||||
|
Reference in New Issue
Block a user