django-transcribe 0.8.3__py3-none-any.whl → 0.8.5__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.
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/METADATA +1 -1
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/RECORD +9 -9
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/WHEEL +1 -1
- transcribe/__init__.py +1 -1
- transcribe/models.py +8 -12
- transcribe/views/web.py +5 -1
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/AUTHORS +0 -0
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/LICENSE +0 -0
- {django_transcribe-0.8.3.dist-info → django_transcribe-0.8.5.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
transcribe/__init__.py,sha256=
|
|
1
|
+
transcribe/__init__.py,sha256=AMqAM2WSrTQFzaD2tjYfcQkm7X2VLt4-J_YdWUsJm-8,78
|
|
2
2
|
transcribe/admin.py,sha256=qPLL0XNzK0abIRBVRtjQq8SaEK2gzb_yyshafbxk9B4,6766
|
|
3
3
|
transcribe/api.py,sha256=2m_y44ilQh87CWksHHqiE4A14javR8omlXEXm65lmC4,74
|
|
4
4
|
transcribe/apps.py,sha256=XUdPQkCjpqWAKDCIaE6Mh8Q4xN5upKv95MG1u2_5pig,246
|
|
@@ -6,7 +6,7 @@ transcribe/diff_match_patch.py,sha256=HZC5DNab5OVwbB4Zc7G17l1OHbBlH2g9-xOtT1zkQ1
|
|
|
6
6
|
transcribe/filters.py,sha256=_ANh6XGDXgmD_wxQo5IPReQsv3_MDqThOwB06LKfbac,1264
|
|
7
7
|
transcribe/forms.py,sha256=6j-MtheDtDeBo9B_hlKhkWkWkKVJsLrJIlSsZAlB7ic,5612
|
|
8
8
|
transcribe/middleware.py,sha256=3SvvNmJMlVohD_4Liv1yT3hc_nudpvt2giAE7Wt9rx4,485
|
|
9
|
-
transcribe/models.py,sha256=
|
|
9
|
+
transcribe/models.py,sha256=1Dp0TKozlRH3z3Z22CuDgNqx6yPjGGe4sg10C7TUd3g,38613
|
|
10
10
|
transcribe/settings.py,sha256=TNRFJstZF9X3l5qZSzv3xcrEuPMmOQbB-59mqADn9Dk,569
|
|
11
11
|
transcribe/signals.py,sha256=pvRSWobg__Jw5ZvlFBZZAw3rDk1dvVyiq8Ka2lBGeSY,1105
|
|
12
12
|
transcribe/urls.py,sha256=xgTkOdeC1cWmQAMzAp-VRwvmwyEAfEabncGgHyZiAL0,2040
|
|
@@ -142,10 +142,10 @@ transcribe/templates/transcribe/xsl/tei-html.xsl,sha256=oOVnAZhDVDVzrQR5UEbNV-97
|
|
|
142
142
|
transcribe/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
143
|
transcribe/views/mixins.py,sha256=QmFDhWb5VCEaGatLdbsTK72jiBG2OKrlncnz79FUmto,2727
|
|
144
144
|
transcribe/views/reports.py,sha256=7YD5E6CPsIfWP8hG8IFTek29cM2T29NHuowAdlTAyBs,13408
|
|
145
|
-
transcribe/views/web.py,sha256=
|
|
146
|
-
django_transcribe-0.8.
|
|
147
|
-
django_transcribe-0.8.
|
|
148
|
-
django_transcribe-0.8.
|
|
149
|
-
django_transcribe-0.8.
|
|
150
|
-
django_transcribe-0.8.
|
|
151
|
-
django_transcribe-0.8.
|
|
145
|
+
transcribe/views/web.py,sha256=Uu58Kv_jCuqLx5CKiFAZYjgfoR4kDAPHAqdgPM5auC4,15348
|
|
146
|
+
django_transcribe-0.8.5.dist-info/AUTHORS,sha256=rNmFConshTlNpyhcu4CKZSeQQMwuyVYXbeqXgRko-Yc,640
|
|
147
|
+
django_transcribe-0.8.5.dist-info/LICENSE,sha256=I9xp13yeayqZikrv7rQrzsDWviTwy1R0phFlKtM1meg,1472
|
|
148
|
+
django_transcribe-0.8.5.dist-info/METADATA,sha256=Q7biziDowIQUDuEW1bnts39keMiHnO4gSgStpY-LhbA,1021
|
|
149
|
+
django_transcribe-0.8.5.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
150
|
+
django_transcribe-0.8.5.dist-info/top_level.txt,sha256=NljSay7zO6czcjqjVmivw6VW58aXlYHVZQvnwmpy08g,11
|
|
151
|
+
django_transcribe-0.8.5.dist-info/RECORD,,
|
transcribe/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
default_app_config = 'transcribe.apps.transcribeConfig'
|
|
2
|
-
__version__ = '0.8.
|
|
2
|
+
__version__ = '0.8.5'
|
transcribe/models.py
CHANGED
|
@@ -7,7 +7,7 @@ from xml.sax.saxutils import escape
|
|
|
7
7
|
|
|
8
8
|
from django.contrib.auth import get_user_model
|
|
9
9
|
from django.db import models
|
|
10
|
-
from django.db.models import Count, Q
|
|
10
|
+
from django.db.models import Count, Max, Q
|
|
11
11
|
from django.urls import reverse
|
|
12
12
|
from django.utils import timezone
|
|
13
13
|
from django.utils.functional import cached_property
|
|
@@ -759,23 +759,19 @@ class Project(TimeStampedModel):
|
|
|
759
759
|
)
|
|
760
760
|
reviews_remaining = total_tasks - total_finished_reviews
|
|
761
761
|
# stats for the given date range
|
|
762
|
-
|
|
762
|
+
user_tasks_grouped_by_task_id = (
|
|
763
763
|
UserTask.objects.filter(task__project=self.id)
|
|
764
764
|
.filter(task__finished_transcription=1)
|
|
765
|
-
.filter(modified__range=[datetime_start, datetime_end])
|
|
766
|
-
.filter(task_type='transcription')
|
|
767
765
|
.filter(status='finished')
|
|
766
|
+
.order_by() # Reset the default ordering defined in UserTask.meta to avoid issues with .values()
|
|
768
767
|
.values('task__id')
|
|
769
|
-
.
|
|
768
|
+
.annotate(max_modified=Max('modified'))
|
|
769
|
+
).filter(max_modified__range=[datetime_start, datetime_end])
|
|
770
|
+
finished_transcriptions = (
|
|
771
|
+
user_tasks_grouped_by_task_id.filter(task_type='transcription')
|
|
770
772
|
).count()
|
|
771
773
|
finished_reviews = (
|
|
772
|
-
|
|
773
|
-
.filter(task__finished_review=1)
|
|
774
|
-
.filter(modified__range=[datetime_start, datetime_end])
|
|
775
|
-
.filter(task_type='review')
|
|
776
|
-
.filter(status='finished')
|
|
777
|
-
.values('task__id')
|
|
778
|
-
.distinct()
|
|
774
|
+
user_tasks_grouped_by_task_id.filter(task_type='review')
|
|
779
775
|
).count()
|
|
780
776
|
|
|
781
777
|
return {
|
transcribe/views/web.py
CHANGED
|
@@ -115,7 +115,11 @@ class DashboardView(
|
|
|
115
115
|
)
|
|
116
116
|
for t in user_tasks_in_progress:
|
|
117
117
|
project = t.task.project
|
|
118
|
-
|
|
118
|
+
# ignore tasks from archived projects
|
|
119
|
+
if project.archived:
|
|
120
|
+
continue
|
|
121
|
+
# Ignore tasks that are already finished
|
|
122
|
+
if 'finished' in t.task.status:
|
|
119
123
|
continue
|
|
120
124
|
# add project
|
|
121
125
|
if t.task_type == 'review':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|