We accomplish this by attching files to out-bound mail diffrently
depending on the versino of Python in effect. In Py2 we can read
the files ourseles and the standard library will still
be able to use the text we pass as if it were bytes. Under Py3,
however, email.message will complain if it doesn't get to decode
the bytes itself, so instead of attaching the contents directly
we just pass the path to the file as a string instead. Unfortunately,
Django 1.8 does not work with this Python 3 approach, due to its
not yet having reverted to the newly improved standard library's
mail-message implementation, and thus requiring us to know more
about the character-encoding/mimetype of the attachment than I've
been able to gather cleanly by this point.
Extract attachment processing from forms, views.staff, and management.command.get_email modules, and consolidate it into a unified lib module function.
Also refactor the affected components, most notably lib.send_templated_email, to make it easier (IMO) to reason about changes to them.
Add unit tests for attachments with UTF-8 filenames, and functional tests for submission of same, as well as ASCII versions, through the public ticket-form.
Remove unused Attachment method "get_upload_to".
- use of patterns() in urls.py is deprecated
- render() functions accept only dicts - introduced checks to ensure downward compatibility back to Django 1.7
Changing parameters in apply_query might yield an invalid state in later
code that assumes the query was not changed.
This patch avoids parameters modification and should fix the issue
reported in #109
- look at settings.py for all new options regarding customization.
- settings can be accessed inside the templates via the new
templatetag 'load_helpdesk_settings'
- allow editing of personal followups, but only if followup does not
contain any ticketchanges - otherwise this information is lost after
the editing.
- add 'delete' link to attachments
- link to list of closed tickets in queue overview
- add 'closed & resolved' section to dashboard
- hide 'pre-set reply' box if no pre-set replies are found.
- use 'SelectDateWidget' for custom DateField
- fix how we update followups so that attachments don't get deleted
- fix bug where resolution emails contained the solution 'None'
- fix stats crashing bug
- fix locale bug