codex 1.6.19__py3-none-any.whl → 1.7.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codex might be problematic. Click here for more details.
- codex/db.py +119 -0
- codex/librarian/covers/purge.py +1 -1
- codex/librarian/importer/const.py +7 -1
- codex/librarian/importer/create_fks.py +5 -2
- codex/librarian/importer/importerd.py +17 -12
- codex/librarian/importer/moved.py +44 -13
- codex/librarian/importer/tasks.py +2 -0
- codex/librarian/janitor/cleanup.py +21 -8
- codex/librarian/janitor/integrity.py +369 -0
- codex/librarian/janitor/janitor.py +50 -15
- codex/librarian/janitor/latest_version.py +2 -1
- codex/librarian/janitor/status.py +5 -0
- codex/librarian/janitor/tasks.py +37 -0
- codex/librarian/janitor/update.py +1 -1
- codex/librarian/librariand.py +32 -24
- codex/librarian/search/optimize.py +43 -0
- codex/librarian/search/remove.py +18 -46
- codex/librarian/search/searchd.py +14 -17
- codex/librarian/search/status.py +2 -1
- codex/librarian/search/tasks.py +4 -9
- codex/librarian/search/update.py +223 -301
- codex/librarian/watchdog/observers.py +2 -1
- codex/migrations/0029_comicfts.py +58 -0
- codex/migrations/0030_nocase_collation_day_month_indexes_status_types.py +198 -0
- codex/models/admin.py +15 -6
- codex/models/base.py +9 -0
- codex/models/bookmark.py +3 -3
- codex/models/comic.py +68 -16
- codex/models/functions.py +59 -2
- codex/models/groups.py +6 -1
- codex/models/library.py +1 -3
- codex/models/paths.py +9 -3
- codex/serializers/browser/page.py +2 -0
- codex/settings/settings.py +16 -17
- codex/signals/django_signals.py +4 -10
- codex/startup.py +1 -35
- codex/static_root/assets/{VCheckbox-Cko1sQK-.170726b3b8a1.js → VCheckbox-CWiqcZ7a.3feebd47daab.js} +1 -1
- codex/static_root/assets/VCheckbox-CWiqcZ7a.3feebd47daab.js.br +0 -0
- codex/static_root/assets/VCheckbox-CWiqcZ7a.3feebd47daab.js.gz +0 -0
- codex/static_root/assets/{VCheckbox-Cko1sQK-.js → VCheckbox-CWiqcZ7a.js} +1 -1
- codex/static_root/assets/VCheckbox-CWiqcZ7a.js.br +0 -0
- codex/static_root/assets/VCheckbox-CWiqcZ7a.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-CO3-aqQL.c9b8062fd66f.js → VCheckboxBtn-Dk3iB62X.bc66d5351baa.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-Dk3iB62X.bc66d5351baa.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-Dk3iB62X.bc66d5351baa.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-CO3-aqQL.js → VCheckboxBtn-Dk3iB62X.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-Dk3iB62X.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-Dk3iB62X.js.gz +0 -0
- codex/static_root/assets/{VCombobox-Bjp6lffE.js → VCombobox-D1_KU27A.b1d30587a973.js} +1 -1
- codex/static_root/assets/VCombobox-D1_KU27A.b1d30587a973.js.br +0 -0
- codex/static_root/assets/VCombobox-D1_KU27A.b1d30587a973.js.gz +0 -0
- codex/static_root/assets/{VCombobox-Bjp6lffE.caf59fba486e.js → VCombobox-D1_KU27A.js} +1 -1
- codex/static_root/assets/VCombobox-D1_KU27A.js.br +0 -0
- codex/static_root/assets/VCombobox-D1_KU27A.js.gz +0 -0
- codex/static_root/assets/{VDialog-BkpVGB70.6eea3ca762a5.js → VDialog-GbxvFMMN.594fb3a39ced.js} +1 -1
- codex/static_root/assets/VDialog-GbxvFMMN.594fb3a39ced.js.br +0 -0
- codex/static_root/assets/VDialog-GbxvFMMN.594fb3a39ced.js.gz +0 -0
- codex/static_root/assets/{VDialog-BkpVGB70.js → VDialog-GbxvFMMN.js} +1 -1
- codex/static_root/assets/VDialog-GbxvFMMN.js.br +0 -0
- codex/static_root/assets/VDialog-GbxvFMMN.js.gz +0 -0
- codex/static_root/assets/{VExpansionPanels-Ci2-j8XX.9c55db4ef49e.js → VExpansionPanels-Cywv_bEj.a762e63858e5.js} +1 -1
- codex/static_root/assets/VExpansionPanels-Cywv_bEj.a762e63858e5.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Cywv_bEj.a762e63858e5.js.gz +0 -0
- codex/static_root/assets/{VExpansionPanels-Ci2-j8XX.js → VExpansionPanels-Cywv_bEj.js} +1 -1
- codex/static_root/assets/VExpansionPanels-Cywv_bEj.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Cywv_bEj.js.gz +0 -0
- codex/static_root/assets/{VRadioGroup-D3Py5BfQ.a4f25edb86d3.js → VRadioGroup-C0etmxpZ.0eb3009a6300.js} +1 -1
- codex/static_root/assets/VRadioGroup-C0etmxpZ.0eb3009a6300.js.br +0 -0
- codex/static_root/assets/VRadioGroup-C0etmxpZ.0eb3009a6300.js.gz +0 -0
- codex/static_root/assets/{VRadioGroup-D3Py5BfQ.js → VRadioGroup-C0etmxpZ.js} +1 -1
- codex/static_root/assets/VRadioGroup-C0etmxpZ.js.br +0 -0
- codex/static_root/assets/VRadioGroup-C0etmxpZ.js.gz +0 -0
- codex/static_root/assets/{VSelect-DtvZsYZz.e98745d858eb.js → VSelect-txrnRiNJ.a5625760018c.js} +1 -1
- codex/static_root/assets/VSelect-txrnRiNJ.a5625760018c.js.br +0 -0
- codex/static_root/assets/VSelect-txrnRiNJ.a5625760018c.js.gz +0 -0
- codex/static_root/assets/{VSelect-DtvZsYZz.js → VSelect-txrnRiNJ.js} +1 -1
- codex/static_root/assets/VSelect-txrnRiNJ.js.br +0 -0
- codex/static_root/assets/VSelect-txrnRiNJ.js.gz +0 -0
- codex/static_root/assets/{VSelectionControl-D6kmykQW.1e1fda62ceba.js → VSelectionControl-CY6RmcvW.7e8824224f6c.js} +1 -1
- codex/static_root/assets/VSelectionControl-CY6RmcvW.7e8824224f6c.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CY6RmcvW.7e8824224f6c.js.gz +0 -0
- codex/static_root/assets/{VSelectionControl-D6kmykQW.js → VSelectionControl-CY6RmcvW.js} +1 -1
- codex/static_root/assets/VSelectionControl-CY6RmcvW.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CY6RmcvW.js.gz +0 -0
- codex/static_root/assets/{VSlideGroup-UGZWxpF5.360bdefcd215.js → VSlideGroup-DtEQMwY1.6c72325635ed.js} +1 -1
- codex/static_root/assets/VSlideGroup-DtEQMwY1.6c72325635ed.js.br +0 -0
- codex/static_root/assets/VSlideGroup-DtEQMwY1.6c72325635ed.js.gz +0 -0
- codex/static_root/assets/{VSlideGroup-UGZWxpF5.js → VSlideGroup-DtEQMwY1.js} +1 -1
- codex/static_root/assets/VSlideGroup-DtEQMwY1.js.br +0 -0
- codex/static_root/assets/VSlideGroup-DtEQMwY1.js.gz +0 -0
- codex/static_root/assets/{VTable-DXH_yQ0o.1149f56ad566.js → VTable-2af995xo.6c5bf36631b2.js} +1 -1
- codex/static_root/assets/VTable-2af995xo.6c5bf36631b2.js.br +0 -0
- codex/static_root/assets/VTable-2af995xo.6c5bf36631b2.js.gz +0 -0
- codex/static_root/assets/{VTable-DXH_yQ0o.js → VTable-2af995xo.js} +1 -1
- codex/static_root/assets/VTable-2af995xo.js.br +0 -0
- codex/static_root/assets/VTable-2af995xo.js.gz +0 -0
- codex/static_root/assets/{VTextField-Blqy56_L.26d8761e0155.js → VTextField-G6CMj7yO.657a130dd302.js} +1 -1
- codex/static_root/assets/VTextField-G6CMj7yO.657a130dd302.js.br +0 -0
- codex/static_root/assets/VTextField-G6CMj7yO.657a130dd302.js.gz +0 -0
- codex/static_root/assets/{VTextField-Blqy56_L.js → VTextField-G6CMj7yO.js} +1 -1
- codex/static_root/assets/VTextField-G6CMj7yO.js.br +0 -0
- codex/static_root/assets/VTextField-G6CMj7yO.js.gz +0 -0
- codex/static_root/assets/{VWindowItem-C8_ovV7e.afbc08414765.js → VWindowItem-CzoGd6Ul.721e5da11ad4.js} +1 -1
- codex/static_root/assets/VWindowItem-CzoGd6Ul.721e5da11ad4.js.br +0 -0
- codex/static_root/assets/VWindowItem-CzoGd6Ul.721e5da11ad4.js.gz +0 -0
- codex/static_root/assets/{VWindowItem-C8_ovV7e.js → VWindowItem-CzoGd6Ul.js} +1 -1
- codex/static_root/assets/VWindowItem-CzoGd6Ul.js.br +0 -0
- codex/static_root/assets/VWindowItem-CzoGd6Ul.js.gz +0 -0
- codex/static_root/assets/{admin-DTRn8bBs.d031ea42d8d0.js → admin-CsPAIQeG.5175467148a3.js} +1 -1
- codex/static_root/assets/admin-CsPAIQeG.5175467148a3.js.br +0 -0
- codex/static_root/assets/admin-CsPAIQeG.5175467148a3.js.gz +0 -0
- codex/static_root/assets/{admin-DTRn8bBs.js → admin-CsPAIQeG.js} +1 -1
- codex/static_root/assets/admin-CsPAIQeG.js.br +0 -0
- codex/static_root/assets/admin-CsPAIQeG.js.gz +0 -0
- codex/static_root/assets/{admin-drawer-panel-BaXFOcru.b1a44b05f482.js → admin-drawer-panel-BAT7GA64.73a064628c19.js} +11 -11
- codex/static_root/assets/admin-drawer-panel-BAT7GA64.73a064628c19.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BAT7GA64.73a064628c19.js.gz +0 -0
- codex/static_root/assets/{admin-drawer-panel-BaXFOcru.js → admin-drawer-panel-BAT7GA64.js} +11 -11
- codex/static_root/assets/admin-drawer-panel-BAT7GA64.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BAT7GA64.js.gz +0 -0
- codex/static_root/assets/browser-C18l93yc.923860009ef4.js +1 -0
- codex/static_root/assets/browser-C18l93yc.923860009ef4.js.br +0 -0
- codex/static_root/assets/browser-C18l93yc.923860009ef4.js.gz +0 -0
- codex/static_root/assets/browser-C18l93yc.js +1 -0
- codex/static_root/assets/browser-C18l93yc.js.br +0 -0
- codex/static_root/assets/browser-C18l93yc.js.gz +0 -0
- codex/static_root/assets/browser-DaAqlBYO.708ecf0904bb.css +1 -0
- codex/static_root/assets/browser-DaAqlBYO.708ecf0904bb.css.br +0 -0
- codex/static_root/assets/browser-DaAqlBYO.708ecf0904bb.css.gz +0 -0
- codex/static_root/assets/browser-DaAqlBYO.css +1 -0
- codex/static_root/assets/browser-DaAqlBYO.css.br +0 -0
- codex/static_root/assets/browser-DaAqlBYO.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.0a4e02656a35.js +1 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.0a4e02656a35.js.br +0 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.0a4e02656a35.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.js +1 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.js.br +0 -0
- codex/static_root/assets/change-password-dialog-BazJdNs9.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.111421f51e79.css +1 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.111421f51e79.css.br +0 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.111421f51e79.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.css +1 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.css.br +0 -0
- codex/static_root/assets/change-password-dialog-Mlmvz8_4.css.gz +0 -0
- codex/static_root/assets/{confirm-dialog-D3_s2DQy.9dde66036c72.js → confirm-dialog-CbW3hlOp.9dd39b443c31.js} +1 -1
- codex/static_root/assets/confirm-dialog-CbW3hlOp.9dd39b443c31.js.br +0 -0
- codex/static_root/assets/confirm-dialog-CbW3hlOp.9dd39b443c31.js.gz +0 -0
- codex/static_root/assets/{confirm-dialog-D3_s2DQy.js → confirm-dialog-CbW3hlOp.js} +1 -1
- codex/static_root/assets/confirm-dialog-CbW3hlOp.js.br +0 -0
- codex/static_root/assets/confirm-dialog-CbW3hlOp.js.gz +0 -0
- codex/static_root/assets/{datetime-column-BxC1Li9e.3dc314b3295d.js → datetime-column-uSqKZU37.b157b0743db5.js} +1 -1
- codex/static_root/assets/datetime-column-uSqKZU37.b157b0743db5.js.br +0 -0
- codex/static_root/assets/datetime-column-uSqKZU37.b157b0743db5.js.gz +0 -0
- codex/static_root/assets/{datetime-column-BxC1Li9e.js → datetime-column-uSqKZU37.js} +1 -1
- codex/static_root/assets/datetime-column-uSqKZU37.js.br +0 -0
- codex/static_root/assets/datetime-column-uSqKZU37.js.gz +0 -0
- codex/static_root/assets/{filter-Bzk7x841.d0c3b602e62d.js → filter-CBl5KEsB.845a81573c2e.js} +1 -1
- codex/static_root/assets/filter-CBl5KEsB.845a81573c2e.js.br +0 -0
- codex/static_root/assets/filter-CBl5KEsB.845a81573c2e.js.gz +0 -0
- codex/static_root/assets/{filter-Bzk7x841.js → filter-CBl5KEsB.js} +1 -1
- codex/static_root/assets/filter-CBl5KEsB.js.br +0 -0
- codex/static_root/assets/filter-CBl5KEsB.js.gz +0 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.ecb6eee2e7a0.js +1 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.ecb6eee2e7a0.js.br +0 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.ecb6eee2e7a0.js.gz +0 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.js +1 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.js.br +0 -0
- codex/static_root/assets/flag-tab-CT8pqM4r.js.gz +0 -0
- codex/static_root/assets/{group-tab-5esH4lwX.a81fdd258117.js → group-tab-BOW9kigw.7e5007596367.js} +1 -1
- codex/static_root/assets/group-tab-BOW9kigw.7e5007596367.js.br +0 -0
- codex/static_root/assets/group-tab-BOW9kigw.7e5007596367.js.gz +0 -0
- codex/static_root/assets/{group-tab-5esH4lwX.js → group-tab-BOW9kigw.js} +1 -1
- codex/static_root/assets/group-tab-BOW9kigw.js.br +0 -0
- codex/static_root/assets/group-tab-BOW9kigw.js.gz +0 -0
- codex/static_root/assets/{http-error-BTOBfcGY.52ced6f28420.js → http-error-C6yuLApo.45cf99eb7a70.js} +1 -1
- codex/static_root/assets/http-error-C6yuLApo.45cf99eb7a70.js.br +4 -0
- codex/static_root/assets/http-error-C6yuLApo.45cf99eb7a70.js.gz +0 -0
- codex/static_root/assets/{http-error-BTOBfcGY.js → http-error-C6yuLApo.js} +1 -1
- codex/static_root/assets/http-error-C6yuLApo.js.br +4 -0
- codex/static_root/assets/http-error-C6yuLApo.js.gz +0 -0
- codex/static_root/assets/{library-tab-DiPEdOF7.ece2d642a9dc.js → library-tab-D3WOtpE0.9af34e6e7235.js} +1 -1
- codex/static_root/assets/library-tab-D3WOtpE0.9af34e6e7235.js.br +0 -0
- codex/static_root/assets/library-tab-D3WOtpE0.9af34e6e7235.js.gz +0 -0
- codex/static_root/assets/{library-tab-DiPEdOF7.js → library-tab-D3WOtpE0.js} +1 -1
- codex/static_root/assets/library-tab-D3WOtpE0.js.br +0 -0
- codex/static_root/assets/library-tab-D3WOtpE0.js.gz +0 -0
- codex/static_root/assets/main-CmjU2oTp.6a471f6900e5.js +6 -0
- codex/static_root/assets/main-CmjU2oTp.6a471f6900e5.js.br +0 -0
- codex/static_root/assets/main-CmjU2oTp.6a471f6900e5.js.gz +0 -0
- codex/static_root/assets/main-CmjU2oTp.js +6 -0
- codex/static_root/assets/main-CmjU2oTp.js.br +0 -0
- codex/static_root/assets/main-CmjU2oTp.js.gz +0 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.6e92d0555cd7.js +1 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.6e92d0555cd7.js.br +0 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.6e92d0555cd7.js.gz +0 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.js +1 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.js.br +0 -0
- codex/static_root/assets/pager-full-pdf-BH54_5f6.js.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-C45-onwe.4722195bb60b.css → pagination-toolbar-DGrxp2OD.css} +1 -1
- codex/static_root/assets/pagination-toolbar-DGrxp2OD.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-DGrxp2OD.css.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-C45-onwe.css → pagination-toolbar-DGrxp2OD.f960a624f04f.css} +1 -1
- codex/static_root/assets/pagination-toolbar-DGrxp2OD.f960a624f04f.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-DGrxp2OD.f960a624f04f.css.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-CkIzuyx1.00c354a82e6e.js → pagination-toolbar-JH3Kbffr.451171f7ac33.js} +1 -1
- codex/static_root/assets/pagination-toolbar-JH3Kbffr.451171f7ac33.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-JH3Kbffr.451171f7ac33.js.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-CkIzuyx1.js → pagination-toolbar-JH3Kbffr.js} +1 -1
- codex/static_root/assets/pagination-toolbar-JH3Kbffr.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-JH3Kbffr.js.gz +0 -0
- codex/static_root/assets/{pdf-doc-BjlRPuf4.0f056fa321b6.js → pdf-doc-BcRNpoaW.882f6e967869.js} +1 -1
- codex/static_root/assets/pdf-doc-BcRNpoaW.882f6e967869.js.br +0 -0
- codex/static_root/assets/pdf-doc-BcRNpoaW.882f6e967869.js.gz +0 -0
- codex/static_root/assets/{pdf-doc-BjlRPuf4.js → pdf-doc-BcRNpoaW.js} +1 -1
- codex/static_root/assets/pdf-doc-BcRNpoaW.js.br +0 -0
- codex/static_root/assets/pdf-doc-BcRNpoaW.js.gz +0 -0
- codex/static_root/assets/reader-DIPRg2VB.900370e097aa.js +2 -0
- codex/static_root/assets/reader-DIPRg2VB.900370e097aa.js.br +0 -0
- codex/static_root/assets/reader-DIPRg2VB.900370e097aa.js.gz +0 -0
- codex/static_root/assets/reader-DIPRg2VB.js +2 -0
- codex/static_root/assets/reader-DIPRg2VB.js.br +0 -0
- codex/static_root/assets/reader-DIPRg2VB.js.gz +0 -0
- codex/static_root/assets/reader-DveZZr9x.7b21b9f8f628.css +1 -0
- codex/static_root/assets/reader-DveZZr9x.7b21b9f8f628.css.br +0 -0
- codex/static_root/assets/reader-DveZZr9x.7b21b9f8f628.css.gz +0 -0
- codex/static_root/assets/reader-DveZZr9x.css +1 -0
- codex/static_root/assets/reader-DveZZr9x.css.br +0 -0
- codex/static_root/assets/reader-DveZZr9x.css.gz +0 -0
- codex/static_root/assets/{relation-chips-CUSatZET.js → relation-chips-3tTlR5QH.71f18bc92adc.js} +1 -1
- codex/static_root/assets/relation-chips-3tTlR5QH.71f18bc92adc.js.br +0 -0
- codex/static_root/assets/relation-chips-3tTlR5QH.71f18bc92adc.js.gz +0 -0
- codex/static_root/assets/{relation-chips-CUSatZET.a58031ff8141.js → relation-chips-3tTlR5QH.js} +1 -1
- codex/static_root/assets/relation-chips-3tTlR5QH.js.br +0 -0
- codex/static_root/assets/relation-chips-3tTlR5QH.js.gz +0 -0
- codex/static_root/assets/{settings-drawer-BSHTAsJ9.js → settings-drawer-BdyFhA_r.151f4c3061ed.js} +2 -2
- codex/static_root/assets/settings-drawer-BdyFhA_r.151f4c3061ed.js.br +0 -0
- codex/static_root/assets/settings-drawer-BdyFhA_r.151f4c3061ed.js.gz +0 -0
- codex/static_root/assets/{settings-drawer-BSHTAsJ9.1d07ce084fc9.js → settings-drawer-BdyFhA_r.js} +2 -2
- codex/static_root/assets/settings-drawer-BdyFhA_r.js.br +0 -0
- codex/static_root/assets/settings-drawer-BdyFhA_r.js.gz +0 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.7557c71b4cfa.js +1 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.7557c71b4cfa.js.br +0 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.7557c71b4cfa.js.gz +0 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.js +1 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.js.br +0 -0
- codex/static_root/assets/stats-tab-DeKjwvmh.js.gz +0 -0
- codex/static_root/assets/{stats-tab-BXGisn5N.9b7a71e7fe28.css → stats-tab-DpfGsVX3.1cb66f2649a9.css} +1 -1
- codex/static_root/assets/stats-tab-DpfGsVX3.1cb66f2649a9.css.br +0 -0
- codex/static_root/assets/stats-tab-DpfGsVX3.1cb66f2649a9.css.gz +0 -0
- codex/static_root/assets/{stats-tab-BXGisn5N.css → stats-tab-DpfGsVX3.css} +1 -1
- codex/static_root/assets/stats-tab-DpfGsVX3.css.br +0 -0
- codex/static_root/assets/stats-tab-DpfGsVX3.css.gz +0 -0
- codex/static_root/assets/{task-tab-NORFAa9p.97e07e366ddd.js → task-tab-C8D0qRP_.d4ab174c69a3.js} +1 -1
- codex/static_root/assets/task-tab-C8D0qRP_.d4ab174c69a3.js.br +0 -0
- codex/static_root/assets/task-tab-C8D0qRP_.d4ab174c69a3.js.gz +0 -0
- codex/static_root/assets/{task-tab-NORFAa9p.js → task-tab-C8D0qRP_.js} +1 -1
- codex/static_root/assets/task-tab-C8D0qRP_.js.br +0 -0
- codex/static_root/assets/task-tab-C8D0qRP_.js.gz +0 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.8e5c1b9e52b0.js +1 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.8e5c1b9e52b0.js.br +0 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.8e5c1b9e52b0.js.gz +0 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.js +1 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.js.br +0 -0
- codex/static_root/assets/unauthorized-BHgBRF4z.js.gz +0 -0
- codex/static_root/assets/{unauthorized-muDsv-rC.css → unauthorized-BjhIc97q.728511c92cd0.css} +1 -1
- codex/static_root/assets/unauthorized-BjhIc97q.728511c92cd0.css.br +0 -0
- codex/static_root/assets/unauthorized-BjhIc97q.728511c92cd0.css.gz +0 -0
- codex/static_root/assets/{unauthorized-muDsv-rC.2166ec8b3a32.css → unauthorized-BjhIc97q.css} +1 -1
- codex/static_root/assets/unauthorized-BjhIc97q.css.br +0 -0
- codex/static_root/assets/unauthorized-BjhIc97q.css.gz +0 -0
- codex/static_root/assets/{user-tab-CHbyN1EW.e7206db08680.js → user-tab-BU31Z92y.35613c713faf.js} +1 -1
- codex/static_root/assets/user-tab-BU31Z92y.35613c713faf.js.br +0 -0
- codex/static_root/assets/user-tab-BU31Z92y.35613c713faf.js.gz +0 -0
- codex/static_root/assets/{user-tab-CHbyN1EW.js → user-tab-BU31Z92y.js} +1 -1
- codex/static_root/assets/user-tab-BU31Z92y.js.br +0 -0
- codex/static_root/assets/user-tab-BU31Z92y.js.gz +0 -0
- codex/static_root/js/choices-admin.8aa64c911203.json +1 -0
- codex/static_root/js/choices-admin.8aa64c911203.json.br +0 -0
- codex/static_root/js/choices-admin.8aa64c911203.json.gz +0 -0
- codex/static_root/js/choices-admin.json +1 -1
- codex/static_root/js/choices-admin.json.br +0 -0
- codex/static_root/js/choices-admin.json.gz +0 -0
- codex/static_root/manifest.45cb46e19686.json +635 -0
- codex/static_root/manifest.45cb46e19686.json.br +0 -0
- codex/static_root/manifest.45cb46e19686.json.gz +0 -0
- codex/static_root/manifest.json +248 -248
- codex/static_root/manifest.json.br +0 -0
- codex/static_root/manifest.json.gz +0 -0
- codex/static_root/staticfiles.json +1 -1
- codex/status_controller.py +10 -4
- codex/views/admin/tasks.py +46 -40
- codex/views/auth.py +15 -4
- codex/views/browser/annotations.py +94 -51
- codex/views/browser/base.py +1 -2
- codex/views/browser/browser.py +52 -21
- codex/views/browser/cover.py +8 -4
- codex/views/browser/filters/annotations.py +28 -6
- codex/views/browser/filters/search/__init__.py +1 -0
- codex/views/browser/filters/search/aliases.py +81 -0
- codex/views/browser/filters/search/field/__init__.py +1 -0
- codex/views/browser/filters/search/field/column.py +53 -0
- codex/views/browser/filters/search/field/expression.py +177 -0
- codex/views/browser/filters/search/field/filter.py +70 -0
- codex/views/browser/filters/search/field/optimize.py +71 -0
- codex/views/browser/filters/search/field/parse.py +187 -0
- codex/views/browser/filters/search/fts.py +38 -0
- codex/views/browser/filters/search/parse.py +220 -0
- codex/views/browser/order_by.py +8 -2
- codex/views/browser/page_in_bounds.py +88 -0
- codex/views/browser/paginate.py +28 -113
- codex/views/const.py +0 -1
- codex/views/opds/v1/feed.py +2 -1
- codex/views/opds/v2/feed.py +2 -1
- codex/views/opds/v2/links.py +1 -1
- codex/views/reader/books.py +1 -1
- codex/views/reader/page.py +3 -3
- {codex-1.6.19.dist-info → codex-1.7.0a0.dist-info}/METADATA +18 -10
- {codex-1.6.19.dist-info → codex-1.7.0a0.dist-info}/RECORD +321 -372
- codex/_vendor/__init__.py +0 -0
- codex/_vendor/django_haystack-3.2.1.dist-info/AUTHORS +0 -127
- codex/_vendor/django_haystack-3.2.1.dist-info/INSTALLER +0 -1
- codex/_vendor/django_haystack-3.2.1.dist-info/LICENSE +0 -31
- codex/_vendor/django_haystack-3.2.1.dist-info/METADATA +0 -98
- codex/_vendor/django_haystack-3.2.1.dist-info/RECORD +0 -97
- codex/_vendor/django_haystack-3.2.1.dist-info/REQUESTED +0 -0
- codex/_vendor/django_haystack-3.2.1.dist-info/WHEEL +0 -5
- codex/_vendor/django_haystack-3.2.1.dist-info/top_level.txt +0 -1
- codex/_vendor/haystack/__init__.py +0 -80
- codex/_vendor/haystack/admin.py +0 -163
- codex/_vendor/haystack/apps.py +0 -31
- codex/_vendor/haystack/backends/__init__.py +0 -1109
- codex/_vendor/haystack/backends/elasticsearch2_backend.py +0 -390
- codex/_vendor/haystack/backends/elasticsearch5_backend.py +0 -483
- codex/_vendor/haystack/backends/elasticsearch7_backend.py +0 -586
- codex/_vendor/haystack/backends/elasticsearch_backend.py +0 -1141
- codex/_vendor/haystack/backends/simple_backend.py +0 -132
- codex/_vendor/haystack/backends/solr_backend.py +0 -991
- codex/_vendor/haystack/backends/whoosh_backend.py +0 -1104
- codex/_vendor/haystack/constants.py +0 -57
- codex/_vendor/haystack/exceptions.py +0 -57
- codex/_vendor/haystack/fields.py +0 -562
- codex/_vendor/haystack/forms.py +0 -135
- codex/_vendor/haystack/generic_views.py +0 -141
- codex/_vendor/haystack/indexes.py +0 -548
- codex/_vendor/haystack/inputs.py +0 -169
- codex/_vendor/haystack/management/__init__.py +0 -0
- codex/_vendor/haystack/management/commands/__init__.py +0 -0
- codex/_vendor/haystack/management/commands/build_solr_schema.py +0 -187
- codex/_vendor/haystack/management/commands/clear_index.py +0 -67
- codex/_vendor/haystack/management/commands/haystack_info.py +0 -22
- codex/_vendor/haystack/management/commands/rebuild_index.py +0 -65
- codex/_vendor/haystack/management/commands/update_index.py +0 -438
- codex/_vendor/haystack/manager.py +0 -105
- codex/_vendor/haystack/models.py +0 -257
- codex/_vendor/haystack/panels.py +0 -89
- codex/_vendor/haystack/query.py +0 -771
- codex/_vendor/haystack/routers.py +0 -14
- codex/_vendor/haystack/signals.py +0 -88
- codex/_vendor/haystack/templates/panels/haystack.html +0 -33
- codex/_vendor/haystack/templates/search_configuration/schema.xml +0 -1056
- codex/_vendor/haystack/templates/search_configuration/solrconfig.xml +0 -1446
- codex/_vendor/haystack/templatetags/__init__.py +0 -0
- codex/_vendor/haystack/templatetags/highlight.py +0 -131
- codex/_vendor/haystack/templatetags/more_like_this.py +0 -119
- codex/_vendor/haystack/urls.py +0 -5
- codex/_vendor/haystack/utils/__init__.py +0 -84
- codex/_vendor/haystack/utils/app_loading.py +0 -34
- codex/_vendor/haystack/utils/geo.py +0 -71
- codex/_vendor/haystack/utils/highlighting.py +0 -165
- codex/_vendor/haystack/utils/loading.py +0 -374
- codex/_vendor/haystack/utils/log.py +0 -21
- codex/_vendor/haystack/version.py +0 -16
- codex/_vendor/haystack/views.py +0 -253
- codex/integrity.py +0 -492
- codex/librarian/search/merge.py +0 -86
- codex/librarian/search/version.py +0 -63
- codex/search/__init__.py +0 -1
- codex/search/backend.py +0 -524
- codex/search/backend_search.py +0 -229
- codex/search/engine.py +0 -33
- codex/search/indexes.py +0 -79
- codex/search/query.py +0 -67
- codex/search/writing.py +0 -180
- codex/static_root/assets/VCheckbox-Cko1sQK-.170726b3b8a1.js.br +0 -0
- codex/static_root/assets/VCheckbox-Cko1sQK-.170726b3b8a1.js.gz +0 -0
- codex/static_root/assets/VCheckbox-Cko1sQK-.js.br +0 -0
- codex/static_root/assets/VCheckbox-Cko1sQK-.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-CO3-aqQL.c9b8062fd66f.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-CO3-aqQL.c9b8062fd66f.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-CO3-aqQL.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-CO3-aqQL.js.gz +0 -0
- codex/static_root/assets/VCombobox-Bjp6lffE.caf59fba486e.js.br +0 -0
- codex/static_root/assets/VCombobox-Bjp6lffE.caf59fba486e.js.gz +0 -0
- codex/static_root/assets/VCombobox-Bjp6lffE.js.br +0 -0
- codex/static_root/assets/VCombobox-Bjp6lffE.js.gz +0 -0
- codex/static_root/assets/VDialog-BkpVGB70.6eea3ca762a5.js.br +0 -0
- codex/static_root/assets/VDialog-BkpVGB70.6eea3ca762a5.js.gz +0 -0
- codex/static_root/assets/VDialog-BkpVGB70.js.br +0 -0
- codex/static_root/assets/VDialog-BkpVGB70.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-Ci2-j8XX.9c55db4ef49e.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Ci2-j8XX.9c55db4ef49e.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-Ci2-j8XX.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Ci2-j8XX.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-D3Py5BfQ.a4f25edb86d3.js.br +0 -0
- codex/static_root/assets/VRadioGroup-D3Py5BfQ.a4f25edb86d3.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-D3Py5BfQ.js.br +0 -0
- codex/static_root/assets/VRadioGroup-D3Py5BfQ.js.gz +0 -0
- codex/static_root/assets/VSelect-DtvZsYZz.e98745d858eb.js.br +0 -0
- codex/static_root/assets/VSelect-DtvZsYZz.e98745d858eb.js.gz +0 -0
- codex/static_root/assets/VSelect-DtvZsYZz.js.br +0 -0
- codex/static_root/assets/VSelect-DtvZsYZz.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-D6kmykQW.1e1fda62ceba.js.br +0 -0
- codex/static_root/assets/VSelectionControl-D6kmykQW.1e1fda62ceba.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-D6kmykQW.js.br +0 -0
- codex/static_root/assets/VSelectionControl-D6kmykQW.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-UGZWxpF5.360bdefcd215.js.br +0 -0
- codex/static_root/assets/VSlideGroup-UGZWxpF5.360bdefcd215.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-UGZWxpF5.js.br +0 -0
- codex/static_root/assets/VSlideGroup-UGZWxpF5.js.gz +0 -0
- codex/static_root/assets/VTable-DXH_yQ0o.1149f56ad566.js.br +0 -0
- codex/static_root/assets/VTable-DXH_yQ0o.1149f56ad566.js.gz +0 -0
- codex/static_root/assets/VTable-DXH_yQ0o.js.br +0 -0
- codex/static_root/assets/VTable-DXH_yQ0o.js.gz +0 -0
- codex/static_root/assets/VTextField-Blqy56_L.26d8761e0155.js.br +0 -0
- codex/static_root/assets/VTextField-Blqy56_L.26d8761e0155.js.gz +0 -0
- codex/static_root/assets/VTextField-Blqy56_L.js.br +0 -0
- codex/static_root/assets/VTextField-Blqy56_L.js.gz +0 -0
- codex/static_root/assets/VWindowItem-C8_ovV7e.afbc08414765.js.br +0 -0
- codex/static_root/assets/VWindowItem-C8_ovV7e.afbc08414765.js.gz +0 -0
- codex/static_root/assets/VWindowItem-C8_ovV7e.js.br +0 -0
- codex/static_root/assets/VWindowItem-C8_ovV7e.js.gz +0 -0
- codex/static_root/assets/admin-DTRn8bBs.d031ea42d8d0.js.br +0 -0
- codex/static_root/assets/admin-DTRn8bBs.d031ea42d8d0.js.gz +0 -0
- codex/static_root/assets/admin-DTRn8bBs.js.br +0 -0
- codex/static_root/assets/admin-DTRn8bBs.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BaXFOcru.b1a44b05f482.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BaXFOcru.b1a44b05f482.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BaXFOcru.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BaXFOcru.js.gz +0 -0
- codex/static_root/assets/browser-BBpUyGmz.c1cb9e2d463b.js +0 -1
- codex/static_root/assets/browser-BBpUyGmz.c1cb9e2d463b.js.br +0 -0
- codex/static_root/assets/browser-BBpUyGmz.c1cb9e2d463b.js.gz +0 -0
- codex/static_root/assets/browser-BBpUyGmz.js +0 -1
- codex/static_root/assets/browser-BBpUyGmz.js.br +0 -0
- codex/static_root/assets/browser-BBpUyGmz.js.gz +0 -0
- codex/static_root/assets/browser-Binc3n9H.313722d27ca3.css +0 -1
- codex/static_root/assets/browser-Binc3n9H.313722d27ca3.css.br +0 -0
- codex/static_root/assets/browser-Binc3n9H.313722d27ca3.css.gz +0 -0
- codex/static_root/assets/browser-Binc3n9H.css +0 -1
- codex/static_root/assets/browser-Binc3n9H.css.br +0 -0
- codex/static_root/assets/browser-Binc3n9H.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-Cebek1-c.aff2975e31f8.css +0 -1
- codex/static_root/assets/change-password-dialog-Cebek1-c.aff2975e31f8.css.br +0 -0
- codex/static_root/assets/change-password-dialog-Cebek1-c.aff2975e31f8.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-Cebek1-c.css +0 -1
- codex/static_root/assets/change-password-dialog-Cebek1-c.css.br +0 -0
- codex/static_root/assets/change-password-dialog-Cebek1-c.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-DlHoLhDF.76ab4a29bb9b.js +0 -1
- codex/static_root/assets/change-password-dialog-DlHoLhDF.76ab4a29bb9b.js.br +0 -0
- codex/static_root/assets/change-password-dialog-DlHoLhDF.76ab4a29bb9b.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-DlHoLhDF.js +0 -1
- codex/static_root/assets/change-password-dialog-DlHoLhDF.js.br +0 -0
- codex/static_root/assets/change-password-dialog-DlHoLhDF.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-D3_s2DQy.9dde66036c72.js.br +0 -0
- codex/static_root/assets/confirm-dialog-D3_s2DQy.9dde66036c72.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-D3_s2DQy.js.br +0 -0
- codex/static_root/assets/confirm-dialog-D3_s2DQy.js.gz +0 -0
- codex/static_root/assets/datetime-column-BxC1Li9e.3dc314b3295d.js.br +0 -0
- codex/static_root/assets/datetime-column-BxC1Li9e.3dc314b3295d.js.gz +0 -0
- codex/static_root/assets/datetime-column-BxC1Li9e.js.br +0 -0
- codex/static_root/assets/datetime-column-BxC1Li9e.js.gz +0 -0
- codex/static_root/assets/filter-Bzk7x841.d0c3b602e62d.js.br +0 -0
- codex/static_root/assets/filter-Bzk7x841.d0c3b602e62d.js.gz +0 -0
- codex/static_root/assets/filter-Bzk7x841.js.br +0 -0
- codex/static_root/assets/filter-Bzk7x841.js.gz +0 -0
- codex/static_root/assets/flag-tab-C2bI5zq3.8f8c297600a6.js +0 -1
- codex/static_root/assets/flag-tab-C2bI5zq3.8f8c297600a6.js.br +0 -0
- codex/static_root/assets/flag-tab-C2bI5zq3.8f8c297600a6.js.gz +0 -0
- codex/static_root/assets/flag-tab-C2bI5zq3.js +0 -1
- codex/static_root/assets/flag-tab-C2bI5zq3.js.br +0 -0
- codex/static_root/assets/flag-tab-C2bI5zq3.js.gz +0 -0
- codex/static_root/assets/group-tab-5esH4lwX.a81fdd258117.js.br +0 -0
- codex/static_root/assets/group-tab-5esH4lwX.a81fdd258117.js.gz +0 -0
- codex/static_root/assets/group-tab-5esH4lwX.js.br +0 -0
- codex/static_root/assets/group-tab-5esH4lwX.js.gz +0 -0
- codex/static_root/assets/http-error-BTOBfcGY.52ced6f28420.js.br +0 -0
- codex/static_root/assets/http-error-BTOBfcGY.52ced6f28420.js.gz +0 -0
- codex/static_root/assets/http-error-BTOBfcGY.js.br +0 -0
- codex/static_root/assets/http-error-BTOBfcGY.js.gz +0 -0
- codex/static_root/assets/library-tab-DiPEdOF7.ece2d642a9dc.js.br +0 -0
- codex/static_root/assets/library-tab-DiPEdOF7.ece2d642a9dc.js.gz +0 -0
- codex/static_root/assets/library-tab-DiPEdOF7.js.br +0 -0
- codex/static_root/assets/library-tab-DiPEdOF7.js.gz +0 -0
- codex/static_root/assets/main-BPIPjzsc.66def8991e38.js +0 -6
- codex/static_root/assets/main-BPIPjzsc.66def8991e38.js.br +0 -0
- codex/static_root/assets/main-BPIPjzsc.66def8991e38.js.gz +0 -0
- codex/static_root/assets/main-BPIPjzsc.js +0 -6
- codex/static_root/assets/main-BPIPjzsc.js.br +0 -0
- codex/static_root/assets/main-BPIPjzsc.js.gz +0 -0
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.278b9978f36f.js +0 -1
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.278b9978f36f.js.br +0 -0
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.278b9978f36f.js.gz +0 -0
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.js +0 -1
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.js.br +0 -0
- codex/static_root/assets/pager-full-pdf-CiyC6Al9.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-C45-onwe.4722195bb60b.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-C45-onwe.4722195bb60b.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-C45-onwe.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-C45-onwe.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-CkIzuyx1.00c354a82e6e.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-CkIzuyx1.00c354a82e6e.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-CkIzuyx1.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-CkIzuyx1.js.gz +0 -0
- codex/static_root/assets/pdf-doc-BjlRPuf4.0f056fa321b6.js.br +0 -0
- codex/static_root/assets/pdf-doc-BjlRPuf4.0f056fa321b6.js.gz +0 -0
- codex/static_root/assets/pdf-doc-BjlRPuf4.js.br +0 -0
- codex/static_root/assets/pdf-doc-BjlRPuf4.js.gz +0 -0
- codex/static_root/assets/reader-_stAWL-4.5089e9144795.css +0 -1
- codex/static_root/assets/reader-_stAWL-4.5089e9144795.css.br +0 -0
- codex/static_root/assets/reader-_stAWL-4.5089e9144795.css.gz +0 -0
- codex/static_root/assets/reader-_stAWL-4.css +0 -1
- codex/static_root/assets/reader-_stAWL-4.css.br +0 -0
- codex/static_root/assets/reader-_stAWL-4.css.gz +0 -0
- codex/static_root/assets/reader-ucxnLi2K.d0fbce0f03c1.js +0 -2
- codex/static_root/assets/reader-ucxnLi2K.d0fbce0f03c1.js.br +0 -0
- codex/static_root/assets/reader-ucxnLi2K.d0fbce0f03c1.js.gz +0 -0
- codex/static_root/assets/reader-ucxnLi2K.js +0 -2
- codex/static_root/assets/reader-ucxnLi2K.js.br +0 -0
- codex/static_root/assets/reader-ucxnLi2K.js.gz +0 -0
- codex/static_root/assets/relation-chips-CUSatZET.a58031ff8141.js.br +0 -0
- codex/static_root/assets/relation-chips-CUSatZET.a58031ff8141.js.gz +0 -0
- codex/static_root/assets/relation-chips-CUSatZET.js.br +0 -0
- codex/static_root/assets/relation-chips-CUSatZET.js.gz +0 -0
- codex/static_root/assets/settings-drawer-BSHTAsJ9.1d07ce084fc9.js.br +0 -0
- codex/static_root/assets/settings-drawer-BSHTAsJ9.1d07ce084fc9.js.gz +0 -0
- codex/static_root/assets/settings-drawer-BSHTAsJ9.js.br +0 -0
- codex/static_root/assets/settings-drawer-BSHTAsJ9.js.gz +0 -0
- codex/static_root/assets/stats-tab-BXGisn5N.9b7a71e7fe28.css.br +0 -0
- codex/static_root/assets/stats-tab-BXGisn5N.9b7a71e7fe28.css.gz +0 -0
- codex/static_root/assets/stats-tab-BXGisn5N.css.br +0 -0
- codex/static_root/assets/stats-tab-BXGisn5N.css.gz +0 -0
- codex/static_root/assets/stats-tab-DKXVB2Cc.0a3de58bf5ee.js +0 -1
- codex/static_root/assets/stats-tab-DKXVB2Cc.0a3de58bf5ee.js.br +0 -0
- codex/static_root/assets/stats-tab-DKXVB2Cc.0a3de58bf5ee.js.gz +0 -0
- codex/static_root/assets/stats-tab-DKXVB2Cc.js +0 -1
- codex/static_root/assets/stats-tab-DKXVB2Cc.js.br +0 -0
- codex/static_root/assets/stats-tab-DKXVB2Cc.js.gz +0 -0
- codex/static_root/assets/task-tab-NORFAa9p.97e07e366ddd.js.br +0 -0
- codex/static_root/assets/task-tab-NORFAa9p.97e07e366ddd.js.gz +0 -0
- codex/static_root/assets/task-tab-NORFAa9p.js.br +0 -0
- codex/static_root/assets/task-tab-NORFAa9p.js.gz +0 -0
- codex/static_root/assets/unauthorized-RHaQZRfr.a234e9403f60.js +0 -1
- codex/static_root/assets/unauthorized-RHaQZRfr.a234e9403f60.js.br +0 -0
- codex/static_root/assets/unauthorized-RHaQZRfr.a234e9403f60.js.gz +0 -0
- codex/static_root/assets/unauthorized-RHaQZRfr.js +0 -1
- codex/static_root/assets/unauthorized-RHaQZRfr.js.br +0 -0
- codex/static_root/assets/unauthorized-RHaQZRfr.js.gz +0 -0
- codex/static_root/assets/unauthorized-muDsv-rC.2166ec8b3a32.css.br +0 -0
- codex/static_root/assets/unauthorized-muDsv-rC.2166ec8b3a32.css.gz +0 -0
- codex/static_root/assets/unauthorized-muDsv-rC.css.br +0 -0
- codex/static_root/assets/unauthorized-muDsv-rC.css.gz +0 -0
- codex/static_root/assets/user-tab-CHbyN1EW.e7206db08680.js.br +0 -0
- codex/static_root/assets/user-tab-CHbyN1EW.e7206db08680.js.gz +0 -0
- codex/static_root/assets/user-tab-CHbyN1EW.js.br +0 -0
- codex/static_root/assets/user-tab-CHbyN1EW.js.gz +0 -0
- codex/static_root/js/choices-admin.1a20a5648f20.json +0 -1
- codex/static_root/js/choices-admin.1a20a5648f20.json.br +0 -0
- codex/static_root/js/choices-admin.1a20a5648f20.json.gz +0 -0
- codex/static_root/manifest.0fe31a6cb99f.json +0 -635
- codex/static_root/manifest.0fe31a6cb99f.json.br +0 -0
- codex/static_root/manifest.0fe31a6cb99f.json.gz +0 -0
- codex/templates/search/indexes/codex/comic_text.txt +0 -47
- codex/views/browser/filters/search.py +0 -196
- {codex-1.6.19.dist-info → codex-1.7.0a0.dist-info}/LICENSE +0 -0
- {codex-1.6.19.dist-info → codex-1.7.0a0.dist-info}/WHEEL +0 -0
- {codex-1.6.19.dist-info → codex-1.7.0a0.dist-info}/entry_points.txt +0 -0
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
import copy
|
|
2
|
-
import threading
|
|
3
|
-
import warnings
|
|
4
|
-
|
|
5
|
-
from django.core.exceptions import ImproperlyConfigured
|
|
6
|
-
from django.utils.encoding import force_str
|
|
7
|
-
|
|
8
|
-
from ..haystack import connection_router, connections
|
|
9
|
-
from ..haystack.constants import Indexable # NOQA — exposed as a public export
|
|
10
|
-
from ..haystack.constants import DEFAULT_ALIAS, DJANGO_CT, DJANGO_ID, ID
|
|
11
|
-
from ..haystack.fields import ( # NOQA — exposed as a public export
|
|
12
|
-
BooleanField,
|
|
13
|
-
CharField,
|
|
14
|
-
DateField,
|
|
15
|
-
DateTimeField,
|
|
16
|
-
DecimalField,
|
|
17
|
-
EdgeNgramField,
|
|
18
|
-
FacetCharField,
|
|
19
|
-
FacetDateField,
|
|
20
|
-
FacetDateTimeField,
|
|
21
|
-
FacetIntegerField,
|
|
22
|
-
FloatField,
|
|
23
|
-
IntegerField,
|
|
24
|
-
LocationField,
|
|
25
|
-
MultiValueField,
|
|
26
|
-
NgramField,
|
|
27
|
-
SearchField,
|
|
28
|
-
SearchFieldError,
|
|
29
|
-
)
|
|
30
|
-
from ..haystack.manager import SearchIndexManager
|
|
31
|
-
from ..haystack.utils import get_facet_field_name, get_identifier, get_model_ct
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class DeclarativeMetaclass(type):
|
|
35
|
-
def __new__(cls, name, bases, attrs):
|
|
36
|
-
attrs["fields"] = {}
|
|
37
|
-
|
|
38
|
-
# Inherit any fields from parent(s).
|
|
39
|
-
try:
|
|
40
|
-
parents = [b for b in bases if issubclass(b, SearchIndex)]
|
|
41
|
-
# Simulate the MRO.
|
|
42
|
-
parents.reverse()
|
|
43
|
-
|
|
44
|
-
for p in parents:
|
|
45
|
-
fields = getattr(p, "fields", None)
|
|
46
|
-
|
|
47
|
-
if fields:
|
|
48
|
-
attrs["fields"].update(fields)
|
|
49
|
-
except NameError:
|
|
50
|
-
pass
|
|
51
|
-
|
|
52
|
-
# Build a dictionary of faceted fields for cross-referencing.
|
|
53
|
-
facet_fields = {}
|
|
54
|
-
|
|
55
|
-
for field_name, obj in attrs.items():
|
|
56
|
-
# Only need to check the FacetFields.
|
|
57
|
-
if hasattr(obj, "facet_for"):
|
|
58
|
-
if obj.facet_for not in facet_fields:
|
|
59
|
-
facet_fields[obj.facet_for] = []
|
|
60
|
-
|
|
61
|
-
facet_fields[obj.facet_for].append(field_name)
|
|
62
|
-
|
|
63
|
-
built_fields = {}
|
|
64
|
-
|
|
65
|
-
for field_name, obj in attrs.items():
|
|
66
|
-
if isinstance(obj, SearchField):
|
|
67
|
-
field = attrs[field_name]
|
|
68
|
-
field.set_instance_name(field_name)
|
|
69
|
-
built_fields[field_name] = field
|
|
70
|
-
|
|
71
|
-
# Only check non-faceted fields for the following info.
|
|
72
|
-
if not hasattr(field, "facet_for"):
|
|
73
|
-
if field.faceted:
|
|
74
|
-
# If no other field is claiming this field as
|
|
75
|
-
# ``facet_for``, create a shadow ``FacetField``.
|
|
76
|
-
if field_name not in facet_fields:
|
|
77
|
-
shadow_facet_name = get_facet_field_name(field_name)
|
|
78
|
-
shadow_facet_field = field.facet_class(facet_for=field_name)
|
|
79
|
-
shadow_facet_field.set_instance_name(shadow_facet_name)
|
|
80
|
-
built_fields[shadow_facet_name] = shadow_facet_field
|
|
81
|
-
|
|
82
|
-
attrs["fields"].update(built_fields)
|
|
83
|
-
|
|
84
|
-
# Assigning default 'objects' query manager if it does not already exist
|
|
85
|
-
if "objects" not in attrs:
|
|
86
|
-
try:
|
|
87
|
-
attrs["objects"] = SearchIndexManager(attrs["Meta"].index_label)
|
|
88
|
-
except (KeyError, AttributeError):
|
|
89
|
-
attrs["objects"] = SearchIndexManager(DEFAULT_ALIAS)
|
|
90
|
-
|
|
91
|
-
return super(DeclarativeMetaclass, cls).__new__(cls, name, bases, attrs)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
class SearchIndex(threading.local, metaclass=DeclarativeMetaclass):
|
|
95
|
-
"""
|
|
96
|
-
Base class for building indexes.
|
|
97
|
-
|
|
98
|
-
An example might look like this::
|
|
99
|
-
|
|
100
|
-
import datetime
|
|
101
|
-
from haystack import indexes
|
|
102
|
-
from myapp.models import Note
|
|
103
|
-
|
|
104
|
-
class NoteIndex(indexes.SearchIndex, indexes.Indexable):
|
|
105
|
-
text = indexes.CharField(document=True, use_template=True)
|
|
106
|
-
author = indexes.CharField(model_attr='user')
|
|
107
|
-
pub_date = indexes.DateTimeField(model_attr='pub_date')
|
|
108
|
-
|
|
109
|
-
def get_model(self):
|
|
110
|
-
return Note
|
|
111
|
-
|
|
112
|
-
def index_queryset(self, using=None):
|
|
113
|
-
return self.get_model().objects.filter(pub_date__lte=datetime.datetime.now())
|
|
114
|
-
|
|
115
|
-
"""
|
|
116
|
-
|
|
117
|
-
def __init__(self):
|
|
118
|
-
self.prepared_data = None
|
|
119
|
-
content_fields = []
|
|
120
|
-
|
|
121
|
-
self.field_map = {}
|
|
122
|
-
for field_name, field in self.fields.items():
|
|
123
|
-
# form field map
|
|
124
|
-
self.field_map[field.index_fieldname] = field_name
|
|
125
|
-
if field.document is True:
|
|
126
|
-
content_fields.append(field_name)
|
|
127
|
-
|
|
128
|
-
if not len(content_fields) == 1:
|
|
129
|
-
raise SearchFieldError(
|
|
130
|
-
"The index '%s' must have one (and only one) SearchField with document=True."
|
|
131
|
-
% self.__class__.__name__
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
def get_model(self):
|
|
135
|
-
"""
|
|
136
|
-
Should return the ``Model`` class (not an instance) that the rest of the
|
|
137
|
-
``SearchIndex`` should use.
|
|
138
|
-
|
|
139
|
-
This method is required & you must override it to return the correct class.
|
|
140
|
-
"""
|
|
141
|
-
raise NotImplementedError(
|
|
142
|
-
"You must provide a 'get_model' method for the '%r' index." % self
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
def index_queryset(self, using=None):
|
|
146
|
-
"""
|
|
147
|
-
Get the default QuerySet to index when doing a full update.
|
|
148
|
-
|
|
149
|
-
Subclasses can override this method to avoid indexing certain objects.
|
|
150
|
-
"""
|
|
151
|
-
return self.get_model()._default_manager.all()
|
|
152
|
-
|
|
153
|
-
def read_queryset(self, using=None):
|
|
154
|
-
"""
|
|
155
|
-
Get the default QuerySet for read actions.
|
|
156
|
-
|
|
157
|
-
Subclasses can override this method to work with other managers.
|
|
158
|
-
Useful when working with default managers that filter some objects.
|
|
159
|
-
"""
|
|
160
|
-
return self.index_queryset(using=using)
|
|
161
|
-
|
|
162
|
-
def build_queryset(self, using=None, start_date=None, end_date=None):
|
|
163
|
-
"""
|
|
164
|
-
Get the default QuerySet to index when doing an index update.
|
|
165
|
-
|
|
166
|
-
Subclasses can override this method to take into account related
|
|
167
|
-
model modification times.
|
|
168
|
-
|
|
169
|
-
The default is to use ``SearchIndex.index_queryset`` and filter
|
|
170
|
-
based on ``SearchIndex.get_updated_field``
|
|
171
|
-
"""
|
|
172
|
-
extra_lookup_kwargs = {}
|
|
173
|
-
model = self.get_model()
|
|
174
|
-
updated_field = self.get_updated_field()
|
|
175
|
-
|
|
176
|
-
update_field_msg = (
|
|
177
|
-
"No updated date field found for '%s' " "- not restricting by age."
|
|
178
|
-
) % model.__name__
|
|
179
|
-
|
|
180
|
-
if start_date:
|
|
181
|
-
if updated_field:
|
|
182
|
-
extra_lookup_kwargs["%s__gte" % updated_field] = start_date
|
|
183
|
-
else:
|
|
184
|
-
warnings.warn(update_field_msg)
|
|
185
|
-
|
|
186
|
-
if end_date:
|
|
187
|
-
if updated_field:
|
|
188
|
-
extra_lookup_kwargs["%s__lte" % updated_field] = end_date
|
|
189
|
-
else:
|
|
190
|
-
warnings.warn(update_field_msg)
|
|
191
|
-
|
|
192
|
-
index_qs = None
|
|
193
|
-
|
|
194
|
-
if hasattr(self, "get_queryset"):
|
|
195
|
-
warnings.warn(
|
|
196
|
-
"'SearchIndex.get_queryset' was deprecated in Haystack v2."
|
|
197
|
-
" Please rename the method 'index_queryset'."
|
|
198
|
-
)
|
|
199
|
-
index_qs = self.get_queryset()
|
|
200
|
-
else:
|
|
201
|
-
index_qs = self.index_queryset(using=using)
|
|
202
|
-
|
|
203
|
-
if not hasattr(index_qs, "filter"):
|
|
204
|
-
raise ImproperlyConfigured(
|
|
205
|
-
"The '%r' class must return a 'QuerySet' in the 'index_queryset' method."
|
|
206
|
-
% self
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
# `.select_related()` seems like a good idea here but can fail on
|
|
210
|
-
# nullable `ForeignKey` as well as what seems like other cases.
|
|
211
|
-
return index_qs.filter(**extra_lookup_kwargs).order_by(model._meta.pk.name)
|
|
212
|
-
|
|
213
|
-
def prepare(self, obj):
|
|
214
|
-
"""
|
|
215
|
-
Fetches and adds/alters data before indexing.
|
|
216
|
-
"""
|
|
217
|
-
self.prepared_data = {
|
|
218
|
-
ID: get_identifier(obj),
|
|
219
|
-
DJANGO_CT: get_model_ct(self.get_model()),
|
|
220
|
-
DJANGO_ID: force_str(obj.pk),
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
for field_name, field in self.fields.items():
|
|
224
|
-
# Use the possibly overridden name, which will default to the
|
|
225
|
-
# variable name of the field.
|
|
226
|
-
self.prepared_data[field.index_fieldname] = field.prepare(obj)
|
|
227
|
-
|
|
228
|
-
if hasattr(self, "prepare_%s" % field_name):
|
|
229
|
-
value = getattr(self, "prepare_%s" % field_name)(obj)
|
|
230
|
-
self.prepared_data[field.index_fieldname] = value
|
|
231
|
-
|
|
232
|
-
return self.prepared_data
|
|
233
|
-
|
|
234
|
-
def full_prepare(self, obj, with_string_facet=True):
|
|
235
|
-
self.prepared_data = self.prepare(obj)
|
|
236
|
-
|
|
237
|
-
for field_name, field in self.fields.items():
|
|
238
|
-
# Duplicate data for faceted fields.
|
|
239
|
-
if (
|
|
240
|
-
not with_string_facet
|
|
241
|
-
and field.field_type == "string"
|
|
242
|
-
and getattr(field, "facet_for", None) in self.fields
|
|
243
|
-
):
|
|
244
|
-
continue
|
|
245
|
-
if getattr(field, "facet_for", None):
|
|
246
|
-
source_field_name = self.fields[field.facet_for].index_fieldname
|
|
247
|
-
|
|
248
|
-
# If there's data there, leave it alone. Otherwise, populate it
|
|
249
|
-
# with whatever the related field has.
|
|
250
|
-
if (
|
|
251
|
-
self.prepared_data[field_name] is None
|
|
252
|
-
and source_field_name in self.prepared_data
|
|
253
|
-
):
|
|
254
|
-
self.prepared_data[field.index_fieldname] = self.prepared_data[
|
|
255
|
-
source_field_name
|
|
256
|
-
]
|
|
257
|
-
|
|
258
|
-
# Remove any fields that lack a value and are ``null=True``.
|
|
259
|
-
if field.null is True:
|
|
260
|
-
if self.prepared_data[field.index_fieldname] is None:
|
|
261
|
-
del self.prepared_data[field.index_fieldname]
|
|
262
|
-
|
|
263
|
-
return self.prepared_data
|
|
264
|
-
|
|
265
|
-
def get_content_field(self):
|
|
266
|
-
"""Returns the field that supplies the primary document to be indexed."""
|
|
267
|
-
for _, field in self.fields.items():
|
|
268
|
-
if field.document is True:
|
|
269
|
-
return field.index_fieldname
|
|
270
|
-
|
|
271
|
-
def get_field_weights(self):
|
|
272
|
-
"""Returns a dict of fields with weight values"""
|
|
273
|
-
weights = {}
|
|
274
|
-
for field_name, field in self.fields.items():
|
|
275
|
-
if field.boost:
|
|
276
|
-
weights[field_name] = field.boost
|
|
277
|
-
return weights
|
|
278
|
-
|
|
279
|
-
def _get_backend(self, using):
|
|
280
|
-
warnings.warn(
|
|
281
|
-
"SearchIndex._get_backend is deprecated; use SearchIndex.get_backend instead",
|
|
282
|
-
DeprecationWarning,
|
|
283
|
-
)
|
|
284
|
-
return self.get_backend(using)
|
|
285
|
-
|
|
286
|
-
def get_backend(self, using=None):
|
|
287
|
-
if using is None:
|
|
288
|
-
try:
|
|
289
|
-
using = connection_router.for_write(index=self)[0]
|
|
290
|
-
except IndexError:
|
|
291
|
-
# There's no backend to handle it. Bomb out.
|
|
292
|
-
return None
|
|
293
|
-
|
|
294
|
-
return connections[using].get_backend()
|
|
295
|
-
|
|
296
|
-
def update(self, using=None):
|
|
297
|
-
"""
|
|
298
|
-
Updates the entire index.
|
|
299
|
-
|
|
300
|
-
If ``using`` is provided, it specifies which connection should be
|
|
301
|
-
used. Default relies on the routers to decide which backend should
|
|
302
|
-
be used.
|
|
303
|
-
"""
|
|
304
|
-
|
|
305
|
-
backend = self.get_backend(using)
|
|
306
|
-
|
|
307
|
-
if backend is not None:
|
|
308
|
-
backend.update(self, self.index_queryset(using=using))
|
|
309
|
-
|
|
310
|
-
def update_object(self, instance, using=None, **kwargs):
|
|
311
|
-
"""
|
|
312
|
-
Update the index for a single object. Attached to the class's
|
|
313
|
-
post-save hook.
|
|
314
|
-
|
|
315
|
-
If ``using`` is provided, it specifies which connection should be
|
|
316
|
-
used. Default relies on the routers to decide which backend should
|
|
317
|
-
be used.
|
|
318
|
-
"""
|
|
319
|
-
# Check to make sure we want to index this first.
|
|
320
|
-
if self.should_update(instance, **kwargs):
|
|
321
|
-
backend = self.get_backend(using)
|
|
322
|
-
|
|
323
|
-
if backend is not None:
|
|
324
|
-
backend.update(self, [instance])
|
|
325
|
-
|
|
326
|
-
def remove_object(self, instance, using=None, **kwargs):
|
|
327
|
-
"""
|
|
328
|
-
Remove an object from the index. Attached to the class's
|
|
329
|
-
post-delete hook.
|
|
330
|
-
|
|
331
|
-
If ``using`` is provided, it specifies which connection should be
|
|
332
|
-
used. Default relies on the routers to decide which backend should
|
|
333
|
-
be used.
|
|
334
|
-
"""
|
|
335
|
-
backend = self.get_backend(using)
|
|
336
|
-
|
|
337
|
-
if backend is not None:
|
|
338
|
-
backend.remove(instance, **kwargs)
|
|
339
|
-
|
|
340
|
-
def clear(self, using=None):
|
|
341
|
-
"""
|
|
342
|
-
Clears the entire index.
|
|
343
|
-
|
|
344
|
-
If ``using`` is provided, it specifies which connection should be
|
|
345
|
-
used. Default relies on the routers to decide which backend should
|
|
346
|
-
be used.
|
|
347
|
-
"""
|
|
348
|
-
backend = self.get_backend(using)
|
|
349
|
-
|
|
350
|
-
if backend is not None:
|
|
351
|
-
backend.clear(models=[self.get_model()])
|
|
352
|
-
|
|
353
|
-
def reindex(self, using=None):
|
|
354
|
-
"""
|
|
355
|
-
Completely clear the index for this model and rebuild it.
|
|
356
|
-
|
|
357
|
-
If ``using`` is provided, it specifies which connection should be
|
|
358
|
-
used. Default relies on the routers to decide which backend should
|
|
359
|
-
be used.
|
|
360
|
-
"""
|
|
361
|
-
self.clear(using=using)
|
|
362
|
-
self.update(using=using)
|
|
363
|
-
|
|
364
|
-
def get_updated_field(self):
|
|
365
|
-
"""
|
|
366
|
-
Get the field name that represents the updated date for the model.
|
|
367
|
-
|
|
368
|
-
If specified, this is used by the reindex command to filter out results
|
|
369
|
-
from the QuerySet, enabling you to reindex only recent records. This
|
|
370
|
-
method should either return None (reindex everything always) or a
|
|
371
|
-
string of the Model's DateField/DateTimeField name.
|
|
372
|
-
"""
|
|
373
|
-
return None
|
|
374
|
-
|
|
375
|
-
def should_update(self, instance, **kwargs):
|
|
376
|
-
"""
|
|
377
|
-
Determine if an object should be updated in the index.
|
|
378
|
-
|
|
379
|
-
It's useful to override this when an object may save frequently and
|
|
380
|
-
cause excessive reindexing. You should check conditions on the instance
|
|
381
|
-
and return False if it is not to be indexed.
|
|
382
|
-
|
|
383
|
-
By default, returns True (always reindex).
|
|
384
|
-
"""
|
|
385
|
-
return True
|
|
386
|
-
|
|
387
|
-
def load_all_queryset(self):
|
|
388
|
-
"""
|
|
389
|
-
Provides the ability to override how objects get loaded in conjunction
|
|
390
|
-
with ``SearchQuerySet.load_all``.
|
|
391
|
-
|
|
392
|
-
This is useful for post-processing the results from the query, enabling
|
|
393
|
-
things like adding ``select_related`` or filtering certain data.
|
|
394
|
-
|
|
395
|
-
By default, returns ``all()`` on the model's default manager.
|
|
396
|
-
"""
|
|
397
|
-
return self.get_model()._default_manager.all()
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
class BasicSearchIndex(SearchIndex):
|
|
401
|
-
text = CharField(document=True, use_template=True)
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
# End SearchIndexes
|
|
405
|
-
# Begin ModelSearchIndexes
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
def index_field_from_django_field(f, default=CharField):
|
|
409
|
-
"""
|
|
410
|
-
Returns the Haystack field type that would likely be associated with each
|
|
411
|
-
Django type.
|
|
412
|
-
"""
|
|
413
|
-
result = default
|
|
414
|
-
|
|
415
|
-
if f.get_internal_type() in ("DateField", "DateTimeField"):
|
|
416
|
-
result = DateTimeField
|
|
417
|
-
elif f.get_internal_type() in ("BooleanField", "NullBooleanField"):
|
|
418
|
-
result = BooleanField
|
|
419
|
-
elif f.get_internal_type() in ("CommaSeparatedIntegerField",):
|
|
420
|
-
result = MultiValueField
|
|
421
|
-
elif f.get_internal_type() in ("DecimalField", "FloatField"):
|
|
422
|
-
result = FloatField
|
|
423
|
-
elif f.get_internal_type() in (
|
|
424
|
-
"IntegerField",
|
|
425
|
-
"PositiveIntegerField",
|
|
426
|
-
"PositiveSmallIntegerField",
|
|
427
|
-
"SmallIntegerField",
|
|
428
|
-
):
|
|
429
|
-
result = IntegerField
|
|
430
|
-
|
|
431
|
-
return result
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
class ModelSearchIndex(SearchIndex):
|
|
435
|
-
"""
|
|
436
|
-
Introspects the model assigned to it and generates a `SearchIndex` based on
|
|
437
|
-
the fields of that model.
|
|
438
|
-
|
|
439
|
-
In addition, it adds a `text` field that is the `document=True` field and
|
|
440
|
-
has `use_template=True` option set, just like the `BasicSearchIndex`.
|
|
441
|
-
|
|
442
|
-
Usage of this class might result in inferior `SearchIndex` objects, which
|
|
443
|
-
can directly affect your search results. Use this to establish basic
|
|
444
|
-
functionality and move to custom `SearchIndex` objects for better control.
|
|
445
|
-
|
|
446
|
-
At this time, it does not handle related fields.
|
|
447
|
-
"""
|
|
448
|
-
|
|
449
|
-
text = CharField(document=True, use_template=True)
|
|
450
|
-
# list of reserved field names
|
|
451
|
-
fields_to_skip = (ID, DJANGO_CT, DJANGO_ID, "content", "text")
|
|
452
|
-
|
|
453
|
-
def __init__(self, extra_field_kwargs=None):
|
|
454
|
-
super().__init__()
|
|
455
|
-
|
|
456
|
-
self.model = None
|
|
457
|
-
|
|
458
|
-
self.prepared_data = None
|
|
459
|
-
content_fields = []
|
|
460
|
-
self.extra_field_kwargs = extra_field_kwargs or {}
|
|
461
|
-
|
|
462
|
-
# Introspect the model, adding/removing fields as needed.
|
|
463
|
-
# Adds/Excludes should happen only if the fields are not already
|
|
464
|
-
# defined in `self.fields`.
|
|
465
|
-
self._meta = getattr(self, "Meta", None)
|
|
466
|
-
|
|
467
|
-
if self._meta:
|
|
468
|
-
self.model = getattr(self._meta, "model", None)
|
|
469
|
-
fields = getattr(self._meta, "fields", [])
|
|
470
|
-
excludes = getattr(self._meta, "excludes", [])
|
|
471
|
-
|
|
472
|
-
# Add in the new fields.
|
|
473
|
-
self.fields.update(self.get_fields(fields, excludes))
|
|
474
|
-
|
|
475
|
-
for field_name, field in self.fields.items():
|
|
476
|
-
if field.document is True:
|
|
477
|
-
content_fields.append(field_name)
|
|
478
|
-
|
|
479
|
-
if not len(content_fields) == 1:
|
|
480
|
-
raise SearchFieldError(
|
|
481
|
-
"The index '%s' must have one (and only one) SearchField with document=True."
|
|
482
|
-
% self.__class__.__name__
|
|
483
|
-
)
|
|
484
|
-
|
|
485
|
-
def should_skip_field(self, field):
|
|
486
|
-
"""
|
|
487
|
-
Given a Django model field, return if it should be included in the
|
|
488
|
-
contributed SearchFields.
|
|
489
|
-
"""
|
|
490
|
-
# Skip fields in skip list
|
|
491
|
-
if field.name in self.fields_to_skip:
|
|
492
|
-
return True
|
|
493
|
-
|
|
494
|
-
# Ignore certain fields (AutoField, related fields).
|
|
495
|
-
if field.primary_key or field.is_relation:
|
|
496
|
-
return True
|
|
497
|
-
|
|
498
|
-
return False
|
|
499
|
-
|
|
500
|
-
def get_model(self):
|
|
501
|
-
return self.model
|
|
502
|
-
|
|
503
|
-
def get_index_fieldname(self, f):
|
|
504
|
-
"""
|
|
505
|
-
Given a Django field, return the appropriate index fieldname.
|
|
506
|
-
"""
|
|
507
|
-
return f.name
|
|
508
|
-
|
|
509
|
-
def get_fields(self, fields=None, excludes=None):
|
|
510
|
-
"""
|
|
511
|
-
Given any explicit fields to include and fields to exclude, add
|
|
512
|
-
additional fields based on the associated model.
|
|
513
|
-
"""
|
|
514
|
-
final_fields = {}
|
|
515
|
-
fields = fields or []
|
|
516
|
-
excludes = excludes or []
|
|
517
|
-
|
|
518
|
-
for f in self.model._meta.fields:
|
|
519
|
-
# If the field name is already present, skip
|
|
520
|
-
if f.name in self.fields:
|
|
521
|
-
continue
|
|
522
|
-
|
|
523
|
-
# If field is not present in explicit field listing, skip
|
|
524
|
-
if fields and f.name not in fields:
|
|
525
|
-
continue
|
|
526
|
-
|
|
527
|
-
# If field is in exclude list, skip
|
|
528
|
-
if excludes and f.name in excludes:
|
|
529
|
-
continue
|
|
530
|
-
|
|
531
|
-
if self.should_skip_field(f):
|
|
532
|
-
continue
|
|
533
|
-
|
|
534
|
-
index_field_class = index_field_from_django_field(f)
|
|
535
|
-
|
|
536
|
-
kwargs = copy.copy(self.extra_field_kwargs)
|
|
537
|
-
kwargs.update({"model_attr": f.name})
|
|
538
|
-
|
|
539
|
-
if f.null is True:
|
|
540
|
-
kwargs["null"] = True
|
|
541
|
-
|
|
542
|
-
if f.has_default():
|
|
543
|
-
kwargs["default"] = f.default
|
|
544
|
-
|
|
545
|
-
final_fields[f.name] = index_field_class(**kwargs)
|
|
546
|
-
final_fields[f.name].set_instance_name(self.get_index_fieldname(f))
|
|
547
|
-
|
|
548
|
-
return final_fields
|