diff --git a/.gitignore b/.gitignore index c5cfb7cc9..957d47743 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,7 @@ media/overrides.js # Sqlite database db.sqlite3 +db.sqlite3-journal # PyCharm .idea diff --git a/Pipfile b/Pipfile index 47b4c8663..84a410f51 100644 --- a/Pipfile +++ b/Pipfile @@ -34,6 +34,8 @@ pytest-django = "*" pytest-sugar = "*" pytest-env = "*" pytest-xdist = "*" +psycopg2 = "*" +djangoql = "*" [dev-packages] ipython = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 5cbeecc69..29032f6bb 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "c2ba0313687a4018c574bbf2edace72777e3db768458e2fe3a346c6825c64c2c" + "sha256": "971e0c975821925652865e34eed1c668bc6f52bb8217b776f35e87a66c936e1b" }, "pipfile-spec": 6, "requires": {}, @@ -117,11 +117,11 @@ }, "django": { "hashes": [ - "sha256:25df265e1fdb74f7e7305a1de620a84681bcc9c05e84a3ed97e4a1a63024f18d", - "sha256:d6d94554abc82ca37e447c3d28958f5ac39bd7d4adaa285543ae97fb1129fd69" + "sha256:0292a7ad7d8ffc9cfc6a77f043d2e81f5bbc360c0c4a1686e130ef3432437d23", + "sha256:e89f613e3c1f7ff245ffee3560472f9fa9c07060b11f65e1de3cb763f8dcd4b9" ], "index": "pypi", - "version": "==2.0.9" + "version": "==2.0.10" }, "django-cors-headers": { "hashes": [ @@ -149,19 +149,26 @@ }, "django-filter": { "hashes": [ - "sha256:6f4e4bc1a11151178520567b50320e5c32f8edb552139d93ea3e30613b886f56", - "sha256:86c3925020c27d072cdae7b828aaa5d165c2032a629abbe3c3a1be1edae61c58" + "sha256:3dafb7d2810790498895c22a1f31b2375795910680ac9c1432821cbedb1e176d", + "sha256:a3014de317bef0cd43075a0f08dfa1d319a7ccc5733c3901fb860da70b0dda68" ], "index": "pypi", - "version": "==2.0.0" + "version": "==2.1.0" + }, + "djangoql": { + "hashes": [ + "sha256:7c488ec4e3362e5389ba3c1169d1ff9a27c4222601f32c6dbf6130ce04330d76" + ], + "index": "pypi", + "version": "==0.12.3" }, "djangorestframework": { "hashes": [ - "sha256:607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136", - "sha256:63f76cbe1e7d12b94c357d7e54401103b2e52aef0f7c1650d6c820ad708776e5" + "sha256:79c6efbb2514bc50cf25906d7c0a5cfead714c7af667ff4bd110312cd380ae66", + "sha256:a4138613b67e3a223be6c97f53b13d759c5b90d2b433bad670b8ebf95402075f" ], "index": "pypi", - "version": "==3.9.0" + "version": "==3.9.1" }, "docopt": { "hashes": [ @@ -194,10 +201,10 @@ }, "faker": { "hashes": [ - "sha256:228419b0a788a7ac867ebfafdd438461559ab1a0975edb607300852d9acaa78d", - "sha256:52a3dcc6a565b15fe1c95090321756d5a8a7c1caf5ab3df2f573ed70936ff518" + "sha256:16342dca4d92bfc83bab6a7daf6650e0ab087605a66bc38f17523fdb01757910", + "sha256:d871ea315b2dcba9138b8344f2c131a76ac62d6227ca39f69b0c889fec97376c" ], - "version": "==1.0.1" + "version": "==1.0.2" }, "filelock": { "hashes": [ @@ -310,10 +317,10 @@ }, "packaging": { "hashes": [ - "sha256:0886227f54515e592aaa2e5a553332c73962917f2831f1b0f9b9f4380a4b9807", - "sha256:f95a1e147590f204328170981833854229bb2912ac3d5f89e2a8ccd2834800c9" + "sha256:0c98a5d0be38ed775798ece1b9727178c4469d9c3b4ada66e8e6b7849f8732af", + "sha256:9e1cbf8c12b1f1ce0bb5344b8d7ecf66a6f8a6e91bcb0c84593ed6d3ab5c4ab3" ], - "version": "==18.0" + "version": "==19.0" }, "pdftotext": { "hashes": [ @@ -324,46 +331,89 @@ }, "pillow": { "hashes": [ - "sha256:00203f406818c3f45d47bb8fe7e67d3feddb8dcbbd45a289a1de7dd789226360", - "sha256:0616f800f348664e694dddb0b0c88d26761dd5e9f34e1ed7b7a7d2da14b40cb7", - "sha256:1f7908aab90c92ad85af9d2fec5fc79456a89b3adcc26314d2cde0e238bd789e", - "sha256:2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93", - "sha256:48a9f0538c91fc136b3a576bee0e7cd174773dc9920b310c21dcb5519722e82c", - "sha256:5280ebc42641a1283b7b1f2c20e5b936692198b9dd9995527c18b794850be1a8", - "sha256:5e34e4b5764af65551647f5cc67cf5198c1d05621781d5173b342e5e55bf023b", - "sha256:63b120421ab85cad909792583f83b6ca3584610c2fe70751e23f606a3c2e87f0", - "sha256:696b5e0109fe368d0057f484e2e91717b49a03f1e310f857f133a4acec9f91dd", - "sha256:870ed021a42b1b02b5fe4a739ea735f671a84128c0a666c705db2cb9abd528eb", - "sha256:916da1c19e4012d06a372127d7140dae894806fad67ef44330e5600d77833581", - "sha256:9303a289fa0811e1c6abd9ddebfc770556d7c3311cb2b32eff72164ddc49bc64", - "sha256:9577888ecc0ad7d06c3746afaba339c94d62b59da16f7a5d1cff9e491f23dace", - "sha256:987e1c94a33c93d9b209315bfda9faa54b8edfce6438a1e93ae866ba20de5956", - "sha256:99a3bbdbb844f4fb5d6dd59fac836a40749781c1fa63c563bc216c27aef63f60", - "sha256:99db8dc3097ceafbcff9cb2bff384b974795edeb11d167d391a02c7bfeeb6e16", - "sha256:a5a96cf49eb580756a44ecf12949e52f211e20bffbf5a95760ac14b1e499cd37", - "sha256:aa6ca3eb56704cdc0d876fc6047ffd5ee960caad52452fbee0f99908a141a0ae", - "sha256:aade5e66795c94e4a2b2624affeea8979648d1b0ae3fcee17e74e2c647fc4a8a", - "sha256:b78905860336c1d292409e3df6ad39cc1f1c7f0964e66844bbc2ebfca434d073", - "sha256:b92f521cdc4e4a3041cc343625b699f20b0b5f976793fb45681aac1efda565f8", - "sha256:bfde84bbd6ae5f782206d454b67b7ee8f7f818c29b99fd02bf022fd33bab14cb", - "sha256:c2b62d3df80e694c0e4a0ed47754c9480521e25642251b3ab1dff050a4e60409", - "sha256:c5e2be6c263b64f6f7656e23e18a4a9980cffc671442795682e8c4e4f815dd9f", - "sha256:c99aa3c63104e0818ec566f8ff3942fb7c7a8f35f9912cb63fd8e12318b214b2", - "sha256:dae06620d3978da346375ebf88b9e2dd7d151335ba668c995aea9ed07af7add4", - "sha256:db5499d0710823fa4fb88206050d46544e8f0e0136a9a5f5570b026584c8fd74", - "sha256:f36baafd82119c4a114b9518202f2a983819101dcc14b26e43fc12cbefdce00e", - "sha256:f52b79c8796d81391ab295b04e520bda6feed54d54931708872e8f9ae9db0ea1", - "sha256:ff8cff01582fa1a7e533cb97f628531c4014af4b5f38e33cdcfe5eec29b6d888" + "sha256:051de330a06c99d6f84bcf582960487835bcae3fc99365185dc2d4f65a390c0e", + "sha256:0ae5289948c5e0a16574750021bd8be921c27d4e3527800dc9c2c1d2abc81bf7", + "sha256:0b1efce03619cdbf8bcc61cfae81fcda59249a469f31c6735ea59badd4a6f58a", + "sha256:163136e09bd1d6c6c6026b0a662976e86c58b932b964f255ff384ecc8c3cefa3", + "sha256:18e912a6ccddf28defa196bd2021fe33600cbe5da1aa2f2e2c6df15f720b73d1", + "sha256:24ec3dea52339a610d34401d2d53d0fb3c7fd08e34b20c95d2ad3973193591f1", + "sha256:267f8e4c0a1d7e36e97c6a604f5b03ef58e2b81c1becb4fccecddcb37e063cc7", + "sha256:3273a28734175feebbe4d0a4cde04d4ed20f620b9b506d26f44379d3c72304e1", + "sha256:4c678e23006798fc8b6f4cef2eaad267d53ff4c1779bd1af8725cc11b72a63f3", + "sha256:4d4bc2e6bb6861103ea4655d6b6f67af8e5336e7216e20fff3e18ffa95d7a055", + "sha256:505738076350a337c1740a31646e1de09a164c62c07db3b996abdc0f9d2e50cf", + "sha256:5233664eadfa342c639b9b9977190d64ad7aca4edc51a966394d7e08e7f38a9f", + "sha256:5d95cb9f6cced2628f3e4de7e795e98b2659dfcc7176ab4a01a8b48c2c2f488f", + "sha256:7eda4c737637af74bac4b23aa82ea6fbb19002552be85f0b89bc27e3a762d239", + "sha256:801ddaa69659b36abf4694fed5aa9f61d1ecf2daaa6c92541bbbbb775d97b9fe", + "sha256:825aa6d222ce2c2b90d34a0ea31914e141a85edefc07e17342f1d2fdf121c07c", + "sha256:9c215442ff8249d41ff58700e91ef61d74f47dfd431a50253e1a1ca9436b0697", + "sha256:a3d90022f2202bbb14da991f26ca7a30b7e4c62bf0f8bf9825603b22d7e87494", + "sha256:a631fd36a9823638fe700d9225f9698fb59d049c942d322d4c09544dc2115356", + "sha256:a6523a23a205be0fe664b6b8747a5c86d55da960d9586db039eec9f5c269c0e6", + "sha256:a756ecf9f4b9b3ed49a680a649af45a8767ad038de39e6c030919c2f443eb000", + "sha256:b117287a5bdc81f1bac891187275ec7e829e961b8032c9e5ff38b70fd036c78f", + "sha256:ba04f57d1715ca5ff74bb7f8a818bf929a204b3b3c2c2826d1e1cc3b1c13398c", + "sha256:cd878195166723f30865e05d87cbaf9421614501a4bd48792c5ed28f90fd36ca", + "sha256:cee815cc62d136e96cf76771b9d3eb58e0777ec18ea50de5cfcede8a7c429aa8", + "sha256:d1722b7aa4b40cf93ac3c80d3edd48bf93b9208241d166a14ad8e7a20ee1d4f3", + "sha256:d7c1c06246b05529f9984435fc4fa5a545ea26606e7f450bdbe00c153f5aeaad", + "sha256:e9c8066249c040efdda84793a2a669076f92a301ceabe69202446abb4c5c5ef9", + "sha256:f227d7e574d050ff3996049e086e1f18c7bd2d067ef24131e50a1d3fe5831fbc", + "sha256:fc9a12aad714af36cf3ad0275a96a733526571e52710319855628f476dcb144e" ], "index": "pypi", - "version": "==5.3.0" + "version": "==5.4.1" }, "pluggy": { "hashes": [ - "sha256:447ba94990e8014ee25ec853339faf7b0fc8050cdc3289d4d71f7f410fb90095", - "sha256:bde19360a8ec4dfd8a20dcb811780a30998101f078fc7ded6162f0076f50508f" + "sha256:8ddc32f03971bfdf900a81961a48ccf2fb677cf7715108f85295c67405798616", + "sha256:980710797ff6a041e9a73a5787804f848996ecaa6f8a1b1e08224a5894f2074a" ], - "version": "==0.8.0" + "version": "==0.8.1" + }, + "ply": { + "hashes": [ + "sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3", + "sha256:096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce" + ], + "version": "==3.11" + }, + "psycopg2": { + "hashes": [ + "sha256:02445ebbb3a11a3fe8202c413d5e6faf38bb75b4e336203ee144ca2c46529f94", + "sha256:0e9873e60f98f0c52339abf8f0339d1e22bfe5aae0bcf7aabd40c055175035ec", + "sha256:1148a5eb29073280bf9057c7fc45468592c1bb75a28f6df1591adb93c8cb63d0", + "sha256:259a8324e109d4922b0fcd046e223e289830e2568d6f4132a3702439e5fd532b", + "sha256:28dffa9ed4595429e61bacac41d3f9671bb613d1442ff43bcbec63d4f73ed5e8", + "sha256:314a74302d4737a3865d40ea50e430ce1543c921ba10f39d562e807cfe2edf2a", + "sha256:36b60201b6d215d7658a71493fdf6bd5e60ad9a0cffed39906627ff9f4f3afd3", + "sha256:3f9d532bce54c4234161176ff3b8688ff337575ca441ea27597e112dfcd0ee0c", + "sha256:5d222983847b40af989ad96c07fc3f07e47925e463baa5de716be8f805b41d9b", + "sha256:6757a6d2fc58f7d8f5d471ad180a0bd7b4dd3c7d681f051504fbea7ae29c8d6f", + "sha256:6a0e0f1e74edb0ab57d89680e59e7bfefad2bfbdf7c80eb38304d897d43674bb", + "sha256:6ca703ccdf734e886a1cf53eb702261110f6a8b0ed74bcad15f1399f74d3f189", + "sha256:8513b953d8f443c446aa79a4cc8a898bd415fc5e29349054f03a7d696d495542", + "sha256:9262a5ce2038570cb81b4d6413720484cb1bc52c064b2f36228d735b1f98b794", + "sha256:97441f851d862a0c844d981cbee7ee62566c322ebb3d68f86d66aa99d483985b", + "sha256:a07feade155eb8e69b54dd6774cf6acf2d936660c61d8123b8b6b1f9247b67d6", + "sha256:a9b9c02c91b1e3ec1f1886b2d0a90a0ea07cc529cb7e6e472b556bc20ce658f3", + "sha256:ae88216f94728d691b945983140bf40d51a1ff6c7fe57def93949bf9339ed54a", + "sha256:b360ffd17659491f1a6ad7c928350e229c7b7bd83a2b922b6ee541245c7a776f", + "sha256:b4221957ceccf14b2abdabef42d806e791350be10e21b260d7c9ce49012cc19e", + "sha256:b90758e49d5e6b152a460d10b92f8a6ccf318fcc0ee814dcf53f3a6fc5328789", + "sha256:c669ea986190ed05fb289d0c100cc88064351f2b85177cbfd3564c4f4847d18c", + "sha256:d1b61999d15c79cf7f4f7cc9021477aef35277fc52452cf50fd13b713c84424d", + "sha256:de7bb043d1adaaf46e38d47e7a5f703bb3dab01376111e522b07d25e1a79c1e1", + "sha256:e393568e288d884b94d263f2669215197840d097c7e5b0acd1a51c1ea7d1aba8", + "sha256:ed7e0849337bd37d89f2c2b0216a0de863399ee5d363d31b1e5330a99044737b", + "sha256:f153f71c3164665d269a5d03c7fa76ba675c7a8de9dc09a4e2c2cdc9936a7b41", + "sha256:f1fb5a8427af099beb7f65093cbdb52e021b8e6dbdfaf020402a623f4181baf5", + "sha256:f36b333e9f86a2fba960c72b90c34be6ca71819e300f7b1fc3d2b0f0b2c546cd", + "sha256:f4526d078aedd5187d0508aa5f9a01eae6a48a470ed678406da94b4cd6524b7e" + ], + "index": "pypi", + "version": "==2.7.7" }, "py": { "hashes": [ @@ -396,34 +446,34 @@ }, "pyparsing": { "hashes": [ - "sha256:40856e74d4987de5d01761a22d1621ae1c7f8774585acae358aa5c5936c6c90b", - "sha256:f353aab21fd474459d97b709e527b5571314ee5f067441dc9f88e33eecd96592" + "sha256:66c9268862641abcac4a96ba74506e594c884e3f57690a696d21ad8210ed667a", + "sha256:f6c5ef0d7480ad048c054c37632c67fca55299990fff127850181659eea33fc3" ], - "version": "==2.3.0" + "version": "==2.3.1" }, "pytest": { "hashes": [ - "sha256:f689bf2fc18c4585403348dd56f47d87780bf217c53ed9ae7a3e2d7faa45f8e9", - "sha256:f812ea39a0153566be53d88f8de94839db1e8a05352ed8a49525d7d7f37861e9" + "sha256:41568ea7ecb4a68d7f63837cf65b92ce8d0105e43196ff2b26622995bb3dc4b2", + "sha256:c3c573a29d7c9547fb90217ece8a8843aa0c1328a797e200290dc3d0b4b823be" ], "index": "pypi", - "version": "==4.0.2" + "version": "==4.1.1" }, "pytest-cov": { "hashes": [ - "sha256:513c425e931a0344944f84ea47f3956be0e416d95acbd897a44970c8d926d5d7", - "sha256:e360f048b7dae3f2f2a9a4d067b2dd6b6a015d384d1577c994a43f3f7cbad762" + "sha256:0ab664b25c6aa9716cbf203b17ddb301932383046082c081b9848a0edf5add33", + "sha256:230ef817450ab0699c6cc3c9c8f7a829c34674456f2ed8df1fe1d39780f7c87f" ], "index": "pypi", - "version": "==2.6.0" + "version": "==2.6.1" }, "pytest-django": { "hashes": [ - "sha256:deffd9d65827c582bd0a85638a0fe52f0eb65a764872ddcee9ce51cdf6ae9f55", - "sha256:fe1f71a0171f6b7edac37654da0904c9bd5ffba5221ab5a76779ab870611f41f" + "sha256:1a5d33be930e3172fa238643a380414dc369fe8fa4b3c3de25e59ed142950736", + "sha256:e88e471d3d0f9acfb6293bb03d0ee8a33ed978734e92ea6b5312163a6c9e87cc" ], "index": "pypi", - "version": "==3.4.4" + "version": "==3.4.5" }, "pytest-env": { "hashes": [ @@ -434,10 +484,10 @@ }, "pytest-forked": { "hashes": [ - "sha256:e4500cd0509ec4a26535f7d4112a8cc0f17d3a41c29ffd4eab479d2a55b30805", - "sha256:f275cb48a73fc61a6710726348e1da6d68a978f0ec0c54ece5a5fae5977e5a08" + "sha256:260d03fbd38d5ce41a657759e8d19bc7c8cfa6d0dcfa36c0bc9742d33bc30742", + "sha256:8d05c2e6f33cd4422571b2b1bb309720c398b0549cff499e3e4cde661875ab54" ], - "version": "==0.2" + "version": "==1.0.1" }, "pytest-sugar": { "hashes": [ @@ -449,11 +499,11 @@ }, "pytest-xdist": { "hashes": [ - "sha256:96f893094c89fddeaff3f4783f4807f7aeb138be1a0d87a8805057b6af1201b5", - "sha256:aab1402f2b063df48bf044b042707610f8fcc4c49d0eb9c10e79e30b3f26074f" + "sha256:107e9db0ee30ead02ca93e7d6d4846675f1b2142234f0eb1cd4d76739cd9ae6f", + "sha256:5795f665e112520fa5beab736ad957e7f36ce7d44210f4004be9d99f86529d97" ], "index": "pypi", - "version": "==1.25.0" + "version": "==1.26.0" }, "python-dateutil": { "hashes": [ @@ -473,11 +523,11 @@ }, "python-gnupg": { "hashes": [ - "sha256:2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d", - "sha256:faa69bab58ed0936f0ccf96c99b92369b7a1819305d37dfe5c927d21a437a09d" + "sha256:45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e", + "sha256:85c231850a0275c9722f06e34b45a22510b83a6a6e88f93b5ae32ba04c95056c" ], "index": "pypi", - "version": "==0.4.3" + "version": "==0.4.4" }, "python-levenshtein": { "hashes": [ @@ -487,25 +537,25 @@ }, "pytz": { "hashes": [ - "sha256:31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca", - "sha256:8e0f8568c118d3077b46be7d654cc8167fa916092e28320cde048e54bfc9f1e6" + "sha256:32b0891edff07e28efe91284ed9c31e123d84bea3fd98e1f72be2508f43ef8d9", + "sha256:d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c" ], "index": "pypi", - "version": "==2018.7" + "version": "==2018.9" }, "regex": { "hashes": [ - "sha256:15b4a185ae9782133f398f8ab7c29612a6e5f34ea9411e4cd36e91e78c347ebe", - "sha256:3852b76f0b6d7bd98d328d548716c151b79017f2b81347360f26e5db10fb6503", - "sha256:79a6a60ed1ee3b12eb0e828c01d75e3b743af6616d69add6c2fde1d425a4ba3f", - "sha256:a2938c290b3be2c7cadafa21de3051f2ed23bfaf88728a1fe5dc552cbfdb0326", - "sha256:aff7414712c9e6d260609da9c9af3aacebfbc307a4abe3376c7736e2a6c8563f", - "sha256:d03782f0b0fa34f8f1dbdc94e27cf193b83c6105307a8c10563938c6d85180d9", - "sha256:db79ac3d81e655dc12d38a865dd6d1b569a28fab4c53749051cd599a6eb7614f", - "sha256:e803b3646c3f9c47f1f3dc870173c5d79c0fd2fd8e40bf917b97c7b56701baff", - "sha256:e9660ccca360b6bd79606aab3672562ebb14bce6af6c501107364668543f4bef" + "sha256:0bcd8ab8c812278981df3161db3f94f0ec72f1fa07020173c96f20e74bd7c16a", + "sha256:20b1601b887e1073805adda2f8a09bb4c86dc7629c46c0d7bf28444dcb32920d", + "sha256:3c4327dd686d2e05b1b3d60a256fbf1c93c53001614ed8acd65453e09d40e10f", + "sha256:5e8c6cef2cd964888d5fdf16f3db3dbaaa18c5c5c648161c52c8df065cc26ac5", + "sha256:666b03b1c33ef8105f28ecf0fd26f4480931a91a6e30e29e304c1d9eddce2209", + "sha256:8afb6ecd80154464b1ad31a93228b63832526f9b0291a82a55287ae15c01de79", + "sha256:9326e1c5b9de6e74150bdd424789aecec41c7ecaf9e78bf4c3acfe6868ce1365", + "sha256:e06eac198d9c76bcbe52b987b74ead0d353cfaa9f3d8cd907ec984f4bb20ea1e", + "sha256:eee007ee39a02cb631b74f89f992766b9d7e952a750166f3e5a5baf8c328c070" ], - "version": "==2018.11.22" + "version": "==2019.1.24" }, "requests": { "hashes": [ @@ -565,11 +615,11 @@ }, "tox": { "hashes": [ - "sha256:2a8d8a63660563e41e64e3b5b677e81ce1ffa5e2a93c2c565d3768c287445800", - "sha256:edfca7809925f49bdc110d0a2d9966bbf35a0c25637216d9586e7a5c5de17bfb" + "sha256:04f8f1aa05de8e76d7a266ccd14e0d665d429977cd42123bc38efa9b59964e9e", + "sha256:25ef928babe88c71e3ed3af0c464d1160b01fca2dd1870a5bb26c2dea61a17fc" ], "index": "pypi", - "version": "==3.6.1" + "version": "==3.7.0" }, "tzlocal": { "hashes": [ @@ -586,10 +636,10 @@ }, "virtualenv": { "hashes": [ - "sha256:686176c23a538ecc56d27ed9d5217abd34644823d6391cbeb232f42bf722baad", - "sha256:f899fafcd92e1150f40c8215328be38ff24b519cd95357fa6e78e006c7638208" + "sha256:58c359370401e0af817fb0070911e599c5fdc836166306b04fd0f278151ed125", + "sha256:729f0bcab430e4ef137646805b5b1d8efbb43fe53d4a0f33328624a84a5121f7" ], - "version": "==16.1.0" + "version": "==16.3.0" } }, "develop": { @@ -602,10 +652,10 @@ }, "decorator": { "hashes": [ - "sha256:2c51dff8ef3c447388fe5e4453d24a2bf128d3a4c32af3fabef1f01c6851ab82", - "sha256:c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c" + "sha256:33cd704aea07b4c28b3eb2c97d288a06918275dac0ecebdaf1bc8a48d98adb9e", + "sha256:cabb249f4710888a2fc0e13e9a16c343d932033718ff62e1e9bc93a9d3a9122b" ], - "version": "==4.3.0" + "version": "==4.3.2" }, "ipython": { "hashes": [ @@ -631,10 +681,10 @@ }, "parso": { "hashes": [ - "sha256:35704a43a3c113cce4de228ddb39aab374b8004f4f2407d070b6a2ca784ce8a2", - "sha256:895c63e93b94ac1e1690f5fdd40b65f07c8171e3e53cbd7793b5b96c0e0a7f24" + "sha256:4b8f9ed80c3a4a3191aa3261505d868aa552dd25649cb13a7d73b6b7315edf2d", + "sha256:5a120be2e8863993b597f1c0437efca799e90e0793c98ae5d4e34ebd00140e31" ], - "version": "==0.3.1" + "version": "==0.3.2" }, "pexpect": { "hashes": [ diff --git a/docker-compose.yml.example b/docker-compose.yml.example index fb905832e..312467b91 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -17,9 +17,9 @@ services: volumes: - data:/usr/src/paperless/data - media:/usr/src/paperless/media - # You have to adapt the local path you want the consumption + # You have to adapt the local path you want the consumption # directory to mount to by modifying the part before the ':'. - - ./consume:/consume + - ./consume:/consume env_file: docker-compose.env # The reason the line is here is so that the webserver that doesn't do # any text recognition and doesn't have to install unnecessary @@ -40,7 +40,7 @@ services: - data:/usr/src/paperless/data - media:/usr/src/paperless/media # This should be set to the same value as the consume directory - # in the webserver service above. + # in the webserver service above. - ./consume:/consume # Likewise, you can add a local path to mount a directory for # exporting. This is not strictly needed for paperless to diff --git a/docs/changelog.rst b/docs/changelog.rst index 8157dd625..b5ffece99 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,23 @@ Changelog ######### +2.7.0 +===== + +* `syntonym`_ submitted a pull request to catch IMAP connection errors `#475`_. +* `Stéphane Brunner`_ added ``psycopg2`` to the Pipfile `#489`_. He also fixed + a syntax error in ``docker-compose.yml.example`` `#488`_ and added [DjangoQL](https://github.com/ivelum/djangoql), + which allows a litany of handy search functionality `#492`_. +* `CkuT`_ and `JOKer`_ hacked out a simple, but super-helpful optimisation to + how the thumbnails are served up, improving performance considerably `#481`_. +* `tsia`_ added a few fields to the tags REST API. `#483`_. +* `Brian Cribbs`_ improved the documentation to help people using Paperless + over NFS `#484`_. +* `Brendan M. Sleight`_ updated the documentation to include a note for setting the + ``DEBUG`` value. The ``paperless.conf.example`` file was also updated to + mirror the project defaults. + + 2.6.1 ===== @@ -10,7 +27,7 @@ Changelog that using the push API will work for users of the Docker install. Thanks to `Colin Frei`_ for fixing this in `#466`_. * `khrise`_ submitted a pull request to include the ``added`` property to the - REST API `#471`. + REST API `#471`_. 2.6.0 @@ -609,6 +626,10 @@ bulk of the work on this big change. .. _Sblop: https://github.com/Sblop .. _Colin Frei: https://github.com/colinfrei .. _khrise: https://github.com/khrise +.. _syntonym: https://github.com/syntonym +.. _JOKer: https://github.com/JOKer +.. _Brian Cribbs: https://github.com/cribbstechnolog +.. _Brendan M. Sleight: https://github.com/bmsleight .. _#20: https://github.com/danielquinn/paperless/issues/20 .. _#44: https://github.com/danielquinn/paperless/issues/44 @@ -710,6 +731,13 @@ bulk of the work on this big change. .. _#442: https://github.com/danielquinn/paperless/pull/442 .. _#466: https://github.com/danielquinn/paperless/pull/466 .. _#471: https://github.com/danielquinn/paperless/pull/471 +.. _#475: https://github.com/danielquinn/paperless/pull/475 +.. _#481: https://github.com/danielquinn/paperless/pull/481 +.. _#483: https://github.com/danielquinn/paperless/pull/483 +.. _#484: https://github.com/danielquinn/paperless/pull/484 +.. _#488: https://github.com/danielquinn/paperless/pull/488 +.. _#489: https://github.com/danielquinn/paperless/pull/489 +.. _#492: https://github.com/danielquinn/paperless/pull/492 .. _pipenv: https://docs.pipenv.org/ .. _a new home on Docker Hub: https://hub.docker.com/r/danielquinn/paperless/ diff --git a/docs/requirements.rst b/docs/requirements.rst index b6cbad213..2bfc5cdec 100644 --- a/docs/requirements.rst +++ b/docs/requirements.rst @@ -12,6 +12,7 @@ should work) that has the following software installed: * `Imagemagick`_ version 6.7.5 or higher * `unpaper`_ * `libpoppler-cpp-dev`_ PDF rendering library +* `optipng`_ .. _Python3: https://python.org/ .. _GNU Privacy Guard: https://gnupg.org @@ -19,6 +20,7 @@ should work) that has the following software installed: .. _Imagemagick: http://imagemagick.org/ .. _unpaper: https://www.flameeyes.eu/projects/unpaper .. _libpoppler-cpp-dev: https://poppler.freedesktop.org/ +.. _optipng: http://optipng.sourceforge.net/ Notably, you should confirm how you access your Python3 installation. Many Linux distributions will install Python3 in parallel to Python2, using the diff --git a/docs/setup.rst b/docs/setup.rst index 5c0602294..543411fef 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -78,12 +78,16 @@ Standard (Bare Metal) encrypt/decrypt the original documents. Don't worry about defining this if you don't want to use encryption (the default). + Note also that if you're using the ``runserver`` as mentioned below, you + should make sure that PAPERLESS_DEBUG="true" or is just commented out as + this is the default. + 4. Initialise the SQLite database with ``./manage.py migrate``. 5. Create a user for your Paperless instance with ``./manage.py createsuperuser``. Follow the prompts to create your user. 6. Start the webserver with ``./manage.py runserver :``. - If no specifc IP or port are given, the default is ``127.0.0.1:8000`` - also known as http://localhost:8000/. + If no specific IP or port is given, the default is ``127.0.0.1:8000`` also + known as http://localhost:8000/. You should now be able to visit your (empty) installation at `Paperless webserver`_ or whatever you chose before. You can login with the user/pass you created in #5. @@ -144,6 +148,15 @@ Docker Method instructions in comments in the file. The only change that is a hard requirement is to specify where the consumption directory should mount.[#dockercomposeyml]_ + + .. caution:: + + If you are using NFS mounts for the consume directory you also need to + change the command to turn off inotify as it doesn't work with NFS + + `command: ["document_consumer", "--no-inotify"]` + + 5. Modify ``docker-compose.env`` and adapt the following environment variables: ``PAPERLESS_PASSPHRASE`` diff --git a/paperless.conf.example b/paperless.conf.example index a86523176..aed2eee71 100644 --- a/paperless.conf.example +++ b/paperless.conf.example @@ -61,7 +61,7 @@ PAPERLESS_EMAIL_SECRET="" # Controls whether django's debug mode is enabled. Disable this on production # systems. Debug mode is enabled by default. -PAPERLESS_DEBUG="false" +#PAPERLESS_DEBUG="true" # Paperless can be instructed to attempt to encrypt your PDF files with GPG diff --git a/requirements.txt b/requirements.txt index d30cbf078..b98b44651 100755 --- a/requirements.txt +++ b/requirements.txt @@ -4,77 +4,67 @@ apipkg==1.5 atomicwrites==1.2.1 attrs==18.2.0 babel==2.6.0 -backcall==0.1.0 -certifi==2018.10.15 +certifi==2018.11.29 chardet==3.0.4 -coverage==4.5.1 +coverage==4.5.2 coveralls==1.5.1 dateparser==0.7.0 -decorator==4.3.0 django-cors-headers==2.4.0 django-crispy-forms==1.7.2 -django-extensions==2.1.3 -django-filter==2.0.0 -django==2.0.9 -djangorestframework==3.9.0 +django-extensions==2.1.4 +django-filter==2.1.0 +django==2.0.10 +djangoql==0.12.3 +djangorestframework==3.9.1 docopt==0.6.2 docutils==0.14 execnet==1.5.0 factory-boy==2.11.1 -faker==0.9.2 +faker==1.0.2 filelock==3.0.10 filemagic==1.6 fuzzywuzzy[speedup]==0.15.0 gunicorn==19.9.0 -idna==2.7 +idna==2.8 imagesize==1.1.0 inotify-simple==1.1.8 -ipython-genutils==0.2.0 -ipython==7.1.1 -jedi==0.13.1 jinja2==2.10 langdetect==1.0.7 -markupsafe==1.0 -more-itertools==4.3.0 -packaging==18.0 -parso==0.3.1 +markupsafe==1.1.0 +more-itertools==5.0.0 +packaging==19.0 pdftotext==2.1.1 -pexpect==4.6.0 -pickleshare==0.7.5 -pillow==5.3.0 -pluggy==0.8.0 -psycopg2==2.7.6.1 -prompt-toolkit==2.0.7 -ptyprocess==0.6.0 +pillow==5.4.1 +pluggy==0.8.1 +ply==3.11 +psycopg2==2.7.7 py==1.7.0 pycodestyle==2.4.0 -pygments==2.2.0 +pygments==2.3.1 pyocr==0.5.3 -pyparsing==2.3.0 -pytest-cov==2.6.0 -pytest-django==3.4.3 +pyparsing==2.3.1 +pytest-cov==2.6.1 +pytest-django==3.4.5 pytest-env==0.6.2 -pytest-forked==0.2 -pytest-sugar==0.9.1 -pytest-xdist==1.24.0 -pytest==3.9.3 +pytest-forked==1.0.1 +pytest-sugar==0.9.2 +pytest-xdist==1.26.0 +pytest==4.1.1 python-dateutil==2.7.5 -python-dotenv==0.9.1 -python-gnupg==0.4.3 -python-levenshtein==0.12.0 ; extra == 'speedup' -pytz==2018.7 -regex==2018.11.2 -requests==2.20.0 -six==1.11.0 +python-dotenv==0.10.1 +python-gnupg==0.4.4 +python-levenshtein==0.12.0 +pytz==2018.9 +regex==2019.1.24 +requests==2.21.0 +six==1.12.0 snowballstemmer==1.2.1 -sphinx==1.8.1 +sphinx==1.8.3 sphinxcontrib-websupport==1.1.0 termcolor==1.1.0 text-unidecode==1.2 toml==0.10.0 -tox==3.5.3 -traitlets==4.3.2 +tox==3.7.0 tzlocal==1.5.1 urllib3==1.24.1 -virtualenv==16.1.0 -wcwidth==0.1.7 +virtualenv==16.3.0 diff --git a/src/documents/admin.py b/src/documents/admin.py index ff0365a53..a7c9e828e 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -11,6 +11,7 @@ from django.urls import reverse from django.utils.html import format_html, format_html_join from django.utils.http import urlquote from django.utils.safestring import mark_safe +from djangoql.admin import DjangoQLSearchMixin from documents.actions import ( add_tag_to_selected, @@ -165,7 +166,7 @@ class TagAdmin(CommonAdmin): document_count.admin_order_field = "document_count" -class DocumentAdmin(CommonAdmin): +class DocumentAdmin(DjangoQLSearchMixin, CommonAdmin): class Media: css = { diff --git a/src/documents/mail.py b/src/documents/mail.py index afa1b4362..d54b387b7 100644 --- a/src/documents/mail.py +++ b/src/documents/mail.py @@ -216,7 +216,11 @@ class MailFetcher(Loggable): return r def _connect(self): - self._connection = imaplib.IMAP4_SSL(self._host, self._port) + try: + self._connection = imaplib.IMAP4_SSL(self._host, self._port) + except OSError as e: + msg = "Problem connecting to {}: {}".format(self._host, e.strerror) + raise MailFetcherError(msg) def _login(self): diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index bd00fe466..0075d4de7 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -7,7 +7,14 @@ class CorrespondentSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Correspondent - fields = ("id", "slug", "name") + fields = ( + "id", + "slug", + "name", + "match", + "matching_algorithm", + "is_insensitive" + ) class TagSerializer(serializers.HyperlinkedModelSerializer): @@ -15,7 +22,14 @@ class TagSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Tag fields = ( - "id", "slug", "name", "colour", "match", "matching_algorithm") + "id", + "slug", + "name", + "colour", + "match", + "matching_algorithm", + "is_insensitive" + ) class CorrespondentField(serializers.HyperlinkedRelatedField): diff --git a/src/documents/views.py b/src/documents/views.py index 186b733a5..f72ca22b1 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -2,6 +2,7 @@ from django.http import HttpResponse, HttpResponseBadRequest from django.views.generic import DetailView, FormView, TemplateView from django_filters.rest_framework import DjangoFilterBackend from django.conf import settings +from django.utils import cache from paperless.db import GnuPG from paperless.mixins import SessionOrBasicAuthMixin @@ -56,10 +57,12 @@ class FetchView(SessionOrBasicAuthMixin, DetailView): } if self.kwargs["kind"] == "thumb": - return HttpResponse( + response = HttpResponse( self._get_raw_data(self.object.thumbnail_file), content_type=content_types[Document.TYPE_PNG] ) + cache.patch_cache_control(response, max_age=31536000, private=True) + return response response = HttpResponse( self._get_raw_data(self.object.source_file), diff --git a/src/paperless/settings.py b/src/paperless/settings.py index cb8851f62..eee727287 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -83,6 +83,7 @@ INSTALLED_APPS = [ "rest_framework", "crispy_forms", "django_filters", + "djangoql", ] diff --git a/src/tox.ini b/src/tox.ini index ff47136be..9a5bbff90 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -17,6 +17,5 @@ deps=pycodestyle [testenv:doc] deps = - -r{toxinidir}/../requirements.txt - sphinx + -r {toxinidir}/../requirements.txt commands=sphinx-build -b html ../docs ../docs/_build -W