Commit Graph

559 Commits

Author SHA1 Message Date
9939f62ebd Attachement should be readed in binary mode ... and attached as payload (regarding docs) 2016-12-13 23:28:16 +01:00
e7c4131ed7 Attachement should be readed in binary mode ... and attached as payload (regarding docs) 2016-12-13 22:43:14 +01:00
8dbd54ac16 stop corrupting binary attachments when delivering them by email
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.
2016-12-13 19:41:13 +07:00
e82e5fcd5f urlquote email address when used as get query param 2016-12-11 06:20:03 +07:00
94c39cba69 solves Title changed to . (Null title) on failed attachment upload. 2016-12-11 06:00:05 +07:00
5acd891c68 refactor all handling of attached files
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".
2016-12-08 19:47:20 +07:00
391e35065c per code review, update safe IP addr/port constants, remove commented-out code, and add comments to unexplained code 2016-12-06 09:55:22 +07:00
e8d0c5b2c7 implement mocked pop3 and imap tests for get_email
also update travis to latest django patch releases
2016-12-02 19:04:52 +07:00
399b0901f6 newer version of tests 2016-12-02 17:40:46 +07:00
72a99cc99a Moved existing test for local mailbox into generation of tests for matrix of email configurations; 2016-12-02 17:40:46 +07:00
3cfa371199 hotfix for #456: patch calls to ticket_from_message
add logger arg where missing in get_email
2016-11-29 00:46:42 +07:00
cac3267e82 Merge pull request #454 from reduxionist/prune-legacy-code
Prune legacy code
2016-11-21 20:32:35 +07:00
45a8ce98ac Merge pull request #455 from gwasser/ticket_list_view
Use HTML5 table ordering based on Unix epoch
2016-11-21 20:29:13 +07:00
04f27fdcff Use HTML5 table ordering based on Unix epoch 2016-11-21 00:12:24 -05:00
7738bba2ab remove special-case imports for legacy versions
standardise use, or avoidance, of timezone, template from_string, and Context
2016-11-21 10:16:03 +07:00
f34696df8d Use Django's six module for StringIO imports. 2016-11-17 11:25:46 +00:00
97a24fbe22 Ensure that local files are deleted after processing, and add some information about it to the install.rst documentation 2016-11-12 11:32:04 +07:00
ebfea8274d convert reverse-URL lookups to helpdesk namespace
in views.staff, this fixes:
-run_report's no-tickets-found redirect to report_index
-del_attachment's redirect to parent ticket view after deletion
2016-11-11 10:31:37 +07:00
b0b68b9541 drop south_migrations folder 2016-11-02 17:22:47 +01:00
62163eaf0e patch: implicit closing of open files; 2016-11-01 15:03:51 +01:00
2a7d82413b Miscellaneous improvements from review of #419 2016-10-31 02:57:08 -04:00
37b9d332de Fix some more missing namespace references for login and kb_category 2016-10-31 02:19:41 -04:00
c74208325b Removed test_per_queue_staff_permission assertion, report_index no longer returns unassigned_tickets 2016-10-31 02:06:49 -04:00
26f4987726 Fix a missing helpdesk namespace reference in report_index.html 2016-10-31 01:42:45 -04:00
194641613c Sync with upstream, merged in AbstractForm with bootstrap class 2016-10-31 01:38:49 -04:00
abd6fdcebe simplifying if-case branches on CustomFieldMixin 2016-10-30 20:53:18 +01:00
cce12181f0 refactoring single-letter variables into better names 2016-10-30 20:43:05 +01:00
681a1893bd missed a refactoring 2016-10-30 08:42:05 +01:00
d8d10fae90 DRY in *TicketForm --by adding an Abstrat~ one 2016-10-30 08:39:17 +01:00
bea6fbf75a fixing a deprecated usage, and adding a minor branch control 2016-10-30 08:38:49 +01:00
adf2b16c2c Fix namespaces in test 2016-10-29 04:33:27 -04:00
dc25164304 More PEP8 changes (hopefully last) 2016-10-29 04:27:29 -04:00
4cf46156f1 More PEP8 changes 2016-10-29 04:20:16 -04:00
1f1d477a35 Sync again with master 0.2 2016-10-29 04:11:41 -04:00
d791700582 Fix PEP8 errors 2016-10-29 04:08:57 -04:00
28308d19fb cleanup build-breaking whitespace merge errors 2016-10-29 14:59:14 +07:00
cad174468b Sync with namespace and other v0.2 changes 2016-10-29 03:47:15 -04:00
26c0f2e59f Merge pull request #441 from alexbarcelo/api-prune
Remove all the deprecated API related files and references
2016-10-29 14:12:31 +07:00
53ed0d3a2c Remove all the deprecated API related files and references 2016-10-29 08:50:13 +02:00
43c067dd4f merge changes from updated master 2016-10-29 13:35:03 +07:00
790f1fc003 Merge pull request #374 from alexbarcelo/urls_app_name
Set app_name as 'helpdesk' at the urls.py, and droping url prefixes
2016-10-28 15:59:29 +07:00
6761ad6c10 fixing RST syntax for docstring on akismet.py 2016-10-26 10:22:15 +02:00
f017adea63 fixing those two python files 2016-10-24 10:05:41 +02:00
89a6ae01b8 Fixing style (according to branch 'autocodestyle') + quicktest 2016-10-24 08:04:31 +02:00
179ceb2f82 fixing style on tests 2016-10-23 22:10:32 +02:00
30e3aa55aa almost auto-fix on misc files 2016-10-23 22:09:17 +02:00
3c35473265 fixing views.py (except deprecated api) 2016-10-23 22:02:02 +02:00
24d88be8d9 Initial general clean-up of stuff 2016-10-21 17:14:12 +02:00
d7875587b7 Revert previous change 2016-10-20 12:05:28 -04:00
884662dd21 Ensure binary data is returns so Django can decode it 2016-10-20 11:46:09 -04:00