From 4fd7f5a580d45be75018f1f3ddf6182dbefa0edc Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Fri, 31 Jul 2020 14:12:21 +0200 Subject: requirements for python --- requirements.txt | 5 +++++ server/views.py | 6 +++--- version.txt | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..82f7c89 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +django +pillow +pdfkit +dateparser +pytz diff --git a/server/views.py b/server/views.py index b4bd06e..01e8109 100644 --- a/server/views.py +++ b/server/views.py @@ -33,7 +33,7 @@ def index(request): context = {} parent_group = request.user.groups.values_list('name', flat=True)[ 0] - users = User.objects.filter(groups__name=parent_group).order_by("id") + users = User.objects.filter(groups__name=parent_group).order_by("-id") users_out = [] for user in users: @@ -48,10 +48,10 @@ def index(request): group = Group.objects.get(name=parent_group) if request.user.is_staff: public_types = DocumentType.objects.filter( - Q(group_private=False) | Q(group=group) & Q(enabled=True)) + Q(group_private=False) | Q(group=group) & Q(enabled=True)).order_by("-id") else: public_types = DocumentType.objects.filter( - Q(group_private=False) & Q(enabled=True)) + Q(group_private=False) & Q(enabled=True)).order_by("-id") docs = [] for doc in public_types: ref_docs = Document.objects.filter(document_type=doc) diff --git a/version.txt b/version.txt index ceab6e1..2f45361 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1 \ No newline at end of file +0.2 \ No newline at end of file -- cgit v1.2.1