Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Add and configure DjangoQL #492

Merged
merged 1 commit into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pytest-django = "*"
pytest-sugar = "*"
pytest-env = "*"
pytest-xdist = "*"
djangoql = "*"

[dev-packages]
ipython = "*"
14 changes: 14 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ django==2.0.9
djangorestframework==3.9.0
docopt==0.6.2
docutils==0.14
djangoql==0.12.3
execnet==1.5.0
factory-boy==2.11.1
faker==0.9.2
Expand Down
3 changes: 2 additions & 1 deletion src/documents/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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,
Expand Down Expand Up @@ -165,7 +166,7 @@ def document_count(self, obj):
document_count.admin_order_field = "document_count"


class DocumentAdmin(CommonAdmin):
class DocumentAdmin(DjangoQLSearchMixin, CommonAdmin):

class Media:
css = {
Expand Down
2 changes: 1 addition & 1 deletion src/paperless/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __get_boolean(key, default="NO"):
"rest_framework",
"crispy_forms",
"django_filters",

"djangoql",
]

if os.getenv("PAPERLESS_INSTALLED_APPS"):
Expand Down