Skip to content

Commit

Permalink
Add and configure DjangoQL
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jan 26, 2019
1 parent 0256dcb commit 4efb153
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
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

0 comments on commit 4efb153

Please sign in to comment.