django-transcribe 0.5.17__py3-none-any.whl → 0.7.0__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.
Files changed (38) hide show
  1. {django_transcribe-0.5.17.dist-info → django_transcribe-0.7.0.dist-info}/AUTHORS +6 -2
  2. django_transcribe-0.7.0.dist-info/METADATA +27 -0
  3. {django_transcribe-0.5.17.dist-info → django_transcribe-0.7.0.dist-info}/RECORD +34 -32
  4. {django_transcribe-0.5.17.dist-info → django_transcribe-0.7.0.dist-info}/WHEEL +1 -1
  5. transcribe/__init__.py +1 -1
  6. transcribe/admin.py +56 -11
  7. transcribe/apps.py +1 -2
  8. transcribe/filters.py +1 -2
  9. transcribe/forms.py +21 -4
  10. transcribe/migrations/0001_initial_squashed_0021_point_fks_to_transcribe_user.py +555 -0
  11. transcribe/migrations/0002_initial_data.py +3 -1
  12. transcribe/migrations/0007_reviewer_group_addition.py +2 -2
  13. transcribe/migrations/0018_point_fks_to_user.py +40 -0
  14. transcribe/migrations/0019_create_transcribeuser.py +43 -0
  15. transcribe/migrations/0020_populate_transcribe_users.py +18 -0
  16. transcribe/migrations/0021_point_fks_to_transcribe_user.py +57 -0
  17. transcribe/models.py +37 -21
  18. transcribe/signals.py +10 -1
  19. transcribe/templates/admin/base_site.html +1 -10
  20. transcribe/templates/transcribe/reports/list.html +1 -1
  21. transcribe/templates/transcribe/reports/projects.html +0 -19
  22. transcribe/templates/transcribe/reports/users.html +8 -8
  23. transcribe/templates/transcribe/web/dashboard.html +0 -5
  24. transcribe/templates/transcribe/web/project.html +1 -3
  25. transcribe/templates/transcribe/web/project_edit.html +0 -3
  26. transcribe/templates/transcribe/web/task_edit.html +22 -21
  27. transcribe/templates/transcribe/web/user.html +2 -57
  28. transcribe/templates/transcribe/web/users_list.html +11 -37
  29. transcribe/urls.py +27 -33
  30. transcribe/views/mixins.py +1 -1
  31. transcribe/views/reports.py +40 -28
  32. transcribe/views/web.py +15 -4
  33. django_transcribe-0.5.17.dist-info/METADATA +0 -24
  34. transcribe/templates/.DS_Store +0 -0
  35. transcribe/templates/admin/.DS_Store +0 -0
  36. transcribe/templates/transcribe/.DS_Store +0 -0
  37. {django_transcribe-0.5.17.dist-info → django_transcribe-0.7.0.dist-info}/LICENSE +0 -0
  38. {django_transcribe-0.5.17.dist-info → django_transcribe-0.7.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,555 @@
1
+ # Generated by Django 3.2.20 on 2024-08-29 03:24
2
+
3
+ import django.db.migrations.operations.special
4
+ import django.db.models.deletion
5
+ import django.utils.timezone
6
+ import model_utils.fields
7
+ from django.conf import settings
8
+ from django.contrib.auth.management import create_permissions
9
+ from django.db import migrations, models
10
+
11
+ import transcribe.models
12
+
13
+ INITIAL_TAG_DATA = [
14
+ {
15
+ 'id': 1,
16
+ 'name': 'Heading',
17
+ 'description': 'a heading or chapter title',
18
+ 'open_tag': '<head>',
19
+ 'close_tag': '</head>',
20
+ }, # noqa
21
+ {
22
+ 'id': 2,
23
+ 'name': 'Quote',
24
+ 'description': 'quoted text',
25
+ 'open_tag': '<q>',
26
+ 'close_tag': '</q>',
27
+ }, # noqa
28
+ {
29
+ 'id': 3,
30
+ 'name': 'Person',
31
+ 'description': 'the name of a person (e.g. John Doe)',
32
+ 'open_tag': '<name type="person">',
33
+ 'close_tag': '</name>',
34
+ }, # noqa
35
+ {
36
+ 'id': 4,
37
+ 'name': 'Place',
38
+ 'description': 'the name of a place (e.g. New York City)',
39
+ 'open_tag': '<name type="place">',
40
+ 'close_tag': '</name>',
41
+ }, # noqa
42
+ {
43
+ 'id': 5,
44
+ 'name': 'Date',
45
+ 'description': 'Mark a text string as a date. (Include a normalize...',
46
+ 'open_tag': '<date when="YYYY-MM-DD">',
47
+ 'close_tag': '</date>',
48
+ }, # noqa
49
+ {
50
+ 'id': 6,
51
+ 'name': 'Add',
52
+ 'description': 'an addition or insertion',
53
+ 'open_tag': '<add>',
54
+ 'close_tag': '</add>',
55
+ }, # noqa
56
+ {
57
+ 'id': 7,
58
+ 'name': 'Del',
59
+ 'description': 'as strikeout or deletion',
60
+ 'open_tag': '<del rend="overstrike">',
61
+ 'close_tag': '</del>',
62
+ }, # noqa
63
+ {
64
+ 'id': 8,
65
+ 'name': 'Note',
66
+ 'description': 'a note in the margin, or elsewhere',
67
+ 'open_tag': '<note place="margin">',
68
+ 'close_tag': '</note>',
69
+ }, # noqa
70
+ {
71
+ 'id': 9,
72
+ 'name': 'Unclear',
73
+ 'description': 'mark something as unclear/illegible',
74
+ 'open_tag': '<unclear reason="illegible">',
75
+ 'close_tag': '</unclear>',
76
+ }, # noqa
77
+ {
78
+ 'id': 10,
79
+ 'name': 'Page #',
80
+ 'description': 'mark a new page break along with the printed page ...',
81
+ 'open_tag': '<pb n="',
82
+ 'close_tag': '"/>',
83
+ }, # noqa
84
+ {
85
+ 'id': 11,
86
+ 'name': 'Underline',
87
+ 'description': 'underlined text',
88
+ 'open_tag': '<hi rend="underline">',
89
+ 'close_tag': '</hi>',
90
+ }, # noqa
91
+ {
92
+ 'id': 12,
93
+ 'name': 'Bold',
94
+ 'description': 'bold text',
95
+ 'open_tag': '<hi rend="bold">',
96
+ 'close_tag': '</hi>',
97
+ }, # noqa
98
+ {
99
+ 'id': 13,
100
+ 'name': 'Italic',
101
+ 'description': 'italicized text',
102
+ 'open_tag': '<hi rend="italic">',
103
+ 'close_tag': '</hi>',
104
+ }, # noqa
105
+ {
106
+ 'id': 14,
107
+ 'name': 'Superscript',
108
+ 'description': 'superscript text',
109
+ 'open_tag': '<hi rend="sup">',
110
+ 'close_tag': '</hi>',
111
+ }, # noqa
112
+ {
113
+ 'id': 15,
114
+ 'name': 'Subscript',
115
+ 'description': 'subscript text',
116
+ 'open_tag': '<hi rend="sub">',
117
+ 'close_tag': '</hi>',
118
+ }, # noqa
119
+ ]
120
+
121
+
122
+ def initial_tag_data(apps, schema_editor):
123
+ Tag = apps.get_model('transcribe', 'Tag')
124
+ Tag.objects.all().delete()
125
+ for data in INITIAL_TAG_DATA:
126
+ Tag.objects.get_or_create(**data)
127
+
128
+
129
+ def add_reviewer_group(apps, schema_editor):
130
+ Group = apps.get_model('auth', 'Group')
131
+ Group.objects.get_or_create(name='Reviewer')
132
+
133
+
134
+ def add_admin_group(apps, schema_editor):
135
+ Group = apps.get_model('auth', 'Group')
136
+ Permission = apps.get_model('auth', 'Permission')
137
+ admin_group, _ = Group.objects.get_or_create(name='Admin')
138
+
139
+ # Make sure permissions have been created
140
+ for app_config in apps.get_app_configs():
141
+ app_config.models_module = True
142
+ create_permissions(app_config, verbosity=0)
143
+ app_config.models_module = None
144
+
145
+ permission_codenames = [
146
+ 'add_project',
147
+ 'change_project',
148
+ 'delete_project',
149
+ 'add_task',
150
+ 'change_task',
151
+ 'delete_task',
152
+ 'add_usertask',
153
+ 'change_usertask',
154
+ 'delete_usertask',
155
+ 'add_tag',
156
+ 'change_tag',
157
+ 'delete_tag',
158
+ 'add_transcribeuser',
159
+ 'change_transcribeuser',
160
+ ]
161
+
162
+ permissions = []
163
+ for codename in permission_codenames:
164
+ try:
165
+ permission = Permission.objects.get(codename=codename)
166
+ permissions.append(permission)
167
+ except Permission.DoesNotExist:
168
+ # Optionally log the missing permission
169
+ print(f"Warning: Permission with codename '{codename}' not found.")
170
+
171
+ admin_group.permissions.set(permissions)
172
+
173
+
174
+ def create_transcribe_users(apps, schema_editor):
175
+ User = apps.get_model(settings.AUTH_USER_MODEL)
176
+ TranscribeUser = apps.get_model('transcribe', 'TranscribeUser')
177
+
178
+ for user in User.objects.all():
179
+ TranscribeUser.objects.get_or_create(user=user)
180
+
181
+
182
+ class Migration(migrations.Migration):
183
+
184
+ replaces = [
185
+ ('transcribe', '0001_initial'),
186
+ ('transcribe', '0002_initial_data'),
187
+ ('transcribe', '0003_transcribeuser'),
188
+ ('transcribe', '0004_auto_20150716_1639'),
189
+ ('transcribe', '0005_auto_20150717_0829'),
190
+ ('transcribe', '0006_project_archived'),
191
+ ('transcribe', '0007_reviewer_group_addition'),
192
+ ('transcribe', '0008_auto_20150925_1522'),
193
+ ('transcribe', '0009_auto_20150929_1314'),
194
+ ('transcribe', '0010_userprojectpreferences'),
195
+ ('transcribe', '0011_project_finding_aid_url'),
196
+ ('transcribe', '0012_auto_20160107_1410'),
197
+ ('transcribe', '0013_userpreferences'),
198
+ ('transcribe', '0014_auto_20160203_1544'),
199
+ ('transcribe', '0015_auto_20160309_1342'),
200
+ ('transcribe', '0016_auto_20160817_1343'),
201
+ ('transcribe', '0017_auto_20191115_1123'),
202
+ ('transcribe', '0018_point_fks_to_user'),
203
+ ('transcribe', '0019_create_transcribeuser'),
204
+ ('transcribe', '0020_populate_transcribe_users'),
205
+ ('transcribe', '0021_point_fks_to_transcribe_user'),
206
+ ]
207
+
208
+ dependencies = [
209
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
210
+ ('auth', '0001_initial'),
211
+ ]
212
+
213
+ operations = [
214
+ migrations.CreateModel(
215
+ name='Project',
216
+ fields=[
217
+ (
218
+ 'id',
219
+ models.AutoField(
220
+ auto_created=True,
221
+ primary_key=True,
222
+ serialize=False,
223
+ verbose_name='ID',
224
+ ),
225
+ ),
226
+ (
227
+ 'created',
228
+ model_utils.fields.AutoCreatedField(
229
+ default=django.utils.timezone.now,
230
+ editable=False,
231
+ verbose_name='created',
232
+ ),
233
+ ),
234
+ (
235
+ 'modified',
236
+ model_utils.fields.AutoLastModifiedField(
237
+ default=django.utils.timezone.now,
238
+ editable=False,
239
+ verbose_name='modified',
240
+ ),
241
+ ),
242
+ ('title', models.CharField(db_index=True, max_length=255)),
243
+ ('description', models.TextField()),
244
+ ('guidelines', models.TextField(blank=True)),
245
+ ('priority', models.IntegerField(default=0)),
246
+ ('transcribers_per_task', models.IntegerField(default=2)),
247
+ (
248
+ 'media_type',
249
+ models.CharField(
250
+ choices=[
251
+ ('audio', 'audio'),
252
+ ('text', 'text'),
253
+ ('video', 'video'),
254
+ ],
255
+ default='text',
256
+ max_length=6,
257
+ ),
258
+ ),
259
+ ('archived', models.BooleanField(default=False)),
260
+ (
261
+ 'finding_aid_url',
262
+ models.CharField(blank=True, max_length=2083),
263
+ ),
264
+ (
265
+ 'allow_global_transcriptions',
266
+ models.BooleanField(default=False),
267
+ ),
268
+ ],
269
+ options={
270
+ 'ordering': ['-priority', 'title'],
271
+ },
272
+ ),
273
+ migrations.CreateModel(
274
+ name='Tag',
275
+ fields=[
276
+ (
277
+ 'id',
278
+ models.AutoField(
279
+ auto_created=True,
280
+ primary_key=True,
281
+ serialize=False,
282
+ verbose_name='ID',
283
+ ),
284
+ ),
285
+ ('name', models.CharField(blank=True, max_length=255)),
286
+ ('description', models.CharField(blank=True, max_length=255)),
287
+ ('open_tag', models.TextField()),
288
+ ('close_tag', models.TextField()),
289
+ ],
290
+ ),
291
+ migrations.CreateModel(
292
+ name='Task',
293
+ fields=[
294
+ (
295
+ 'id',
296
+ models.AutoField(
297
+ auto_created=True,
298
+ primary_key=True,
299
+ serialize=False,
300
+ verbose_name='ID',
301
+ ),
302
+ ),
303
+ (
304
+ 'created',
305
+ model_utils.fields.AutoCreatedField(
306
+ default=django.utils.timezone.now,
307
+ editable=False,
308
+ verbose_name='created',
309
+ ),
310
+ ),
311
+ (
312
+ 'modified',
313
+ model_utils.fields.AutoLastModifiedField(
314
+ default=django.utils.timezone.now,
315
+ editable=False,
316
+ verbose_name='modified',
317
+ ),
318
+ ),
319
+ (
320
+ 'file',
321
+ models.FileField(
322
+ upload_to=transcribe.models.task_file_name
323
+ ),
324
+ ),
325
+ ('transcription', models.TextField(blank=True)),
326
+ (
327
+ 'finished_transcription',
328
+ models.BooleanField(
329
+ blank=True, db_index=True, default=False
330
+ ),
331
+ ),
332
+ (
333
+ 'finished_review',
334
+ models.BooleanField(
335
+ blank=True, db_index=True, default=False
336
+ ),
337
+ ),
338
+ (
339
+ 'project',
340
+ models.ForeignKey(
341
+ on_delete=django.db.models.deletion.CASCADE,
342
+ related_name='tasks',
343
+ to='transcribe.project',
344
+ ),
345
+ ),
346
+ ],
347
+ options={
348
+ 'abstract': False,
349
+ },
350
+ ),
351
+ migrations.CreateModel(
352
+ name='TranscribeUser',
353
+ fields=[
354
+ (
355
+ 'id',
356
+ models.AutoField(
357
+ auto_created=True,
358
+ primary_key=True,
359
+ serialize=False,
360
+ verbose_name='ID',
361
+ ),
362
+ ),
363
+ (
364
+ 'user',
365
+ models.OneToOneField(
366
+ on_delete=django.db.models.deletion.CASCADE,
367
+ related_name='transcribe_user',
368
+ to=settings.AUTH_USER_MODEL,
369
+ ),
370
+ ),
371
+ ],
372
+ options={
373
+ 'verbose_name': 'Transcribe user',
374
+ 'verbose_name_plural': 'Transcribe users',
375
+ 'ordering': ['user__last_name', 'user__first_name'],
376
+ },
377
+ ),
378
+ migrations.CreateModel(
379
+ name='UserTask',
380
+ fields=[
381
+ (
382
+ 'id',
383
+ models.AutoField(
384
+ auto_created=True,
385
+ primary_key=True,
386
+ serialize=False,
387
+ verbose_name='ID',
388
+ ),
389
+ ),
390
+ (
391
+ 'created',
392
+ model_utils.fields.AutoCreatedField(
393
+ default=django.utils.timezone.now,
394
+ editable=False,
395
+ verbose_name='created',
396
+ ),
397
+ ),
398
+ (
399
+ 'modified',
400
+ model_utils.fields.AutoLastModifiedField(
401
+ default=django.utils.timezone.now,
402
+ editable=False,
403
+ verbose_name='modified',
404
+ ),
405
+ ),
406
+ (
407
+ 'task_type',
408
+ models.CharField(
409
+ choices=[
410
+ ('transcription', 'transcription'),
411
+ ('review', 'review'),
412
+ ],
413
+ db_index=True,
414
+ default='transcription',
415
+ max_length=13,
416
+ ),
417
+ ),
418
+ ('transcription', models.TextField(blank=True, default='')),
419
+ (
420
+ 'status',
421
+ models.CharField(
422
+ choices=[
423
+ ('in progress', 'in progress'),
424
+ ('skipped', 'skipped'),
425
+ ('finished', 'finished'),
426
+ ],
427
+ db_index=True,
428
+ default='in progress',
429
+ max_length=11,
430
+ ),
431
+ ),
432
+ (
433
+ 'task',
434
+ models.ForeignKey(
435
+ on_delete=django.db.models.deletion.CASCADE,
436
+ related_name='usertasks',
437
+ to='transcribe.task',
438
+ ),
439
+ ),
440
+ (
441
+ 'user',
442
+ models.ForeignKey(
443
+ on_delete=django.db.models.deletion.CASCADE,
444
+ related_name='tasks',
445
+ to='transcribe.transcribeuser',
446
+ ),
447
+ ),
448
+ ],
449
+ options={
450
+ 'ordering': ['-modified', 'user'],
451
+ },
452
+ ),
453
+ migrations.CreateModel(
454
+ name='UserProjectPreferences',
455
+ fields=[
456
+ (
457
+ 'id',
458
+ models.AutoField(
459
+ auto_created=True,
460
+ primary_key=True,
461
+ serialize=False,
462
+ verbose_name='ID',
463
+ ),
464
+ ),
465
+ (
466
+ 'transcription_width',
467
+ models.IntegerField(blank=True, null=True),
468
+ ),
469
+ (
470
+ 'transcription_height',
471
+ models.IntegerField(blank=True, null=True),
472
+ ),
473
+ (
474
+ 'transcription_stacked',
475
+ models.BooleanField(blank=True, default=True),
476
+ ),
477
+ (
478
+ 'project',
479
+ models.ForeignKey(
480
+ on_delete=django.db.models.deletion.CASCADE,
481
+ related_name='userprojects',
482
+ to='transcribe.project',
483
+ ),
484
+ ),
485
+ (
486
+ 'user',
487
+ models.ForeignKey(
488
+ on_delete=django.db.models.deletion.CASCADE,
489
+ related_name='projects',
490
+ to='transcribe.transcribeuser',
491
+ ),
492
+ ),
493
+ ],
494
+ ),
495
+ migrations.CreateModel(
496
+ name='UserPreferences',
497
+ fields=[
498
+ (
499
+ 'id',
500
+ models.AutoField(
501
+ auto_created=True,
502
+ primary_key=True,
503
+ serialize=False,
504
+ verbose_name='ID',
505
+ ),
506
+ ),
507
+ (
508
+ 'uses_serif_transcription_font',
509
+ models.BooleanField(default=True),
510
+ ),
511
+ (
512
+ 'user',
513
+ models.OneToOneField(
514
+ on_delete=django.db.models.deletion.CASCADE,
515
+ related_name='preferences',
516
+ to='transcribe.transcribeuser',
517
+ ),
518
+ ),
519
+ ],
520
+ ),
521
+ migrations.AddField(
522
+ model_name='project',
523
+ name='reviewers',
524
+ field=models.ManyToManyField(
525
+ blank=True,
526
+ related_name='review_projects',
527
+ to='transcribe.TranscribeUser',
528
+ ),
529
+ ),
530
+ migrations.AddField(
531
+ model_name='project',
532
+ name='transcribers',
533
+ field=models.ManyToManyField(
534
+ blank=True,
535
+ related_name='transcription_projects',
536
+ to='transcribe.TranscribeUser',
537
+ ),
538
+ ),
539
+ migrations.RunPython(
540
+ code=initial_tag_data,
541
+ reverse_code=django.db.migrations.operations.special.RunPython.noop,
542
+ ),
543
+ migrations.RunPython(
544
+ code=add_reviewer_group,
545
+ reverse_code=django.db.migrations.operations.special.RunPython.noop,
546
+ ),
547
+ migrations.RunPython(
548
+ code=add_admin_group,
549
+ reverse_code=django.db.migrations.operations.special.RunPython.noop,
550
+ ),
551
+ migrations.RunPython(
552
+ code=create_transcribe_users,
553
+ reverse_code=django.db.migrations.operations.special.RunPython.noop,
554
+ ),
555
+ ]
@@ -124,5 +124,7 @@ class Migration(migrations.Migration):
124
124
  dependencies = [('transcribe', '0001_initial')]
125
125
 
126
126
  operations = [
127
- migrations.RunPython(initial_tag_data, reverse_code=lambda a, b: None)
127
+ migrations.RunPython(
128
+ initial_tag_data, reverse_code=migrations.RunPython.noop
129
+ ),
128
130
  ]
@@ -2,8 +2,8 @@
2
2
  from __future__ import unicode_literals
3
3
 
4
4
  from django.db import migrations
5
- from transcribe.management.commands.fix_permissions import Command
6
5
 
6
+ from transcribe.management.commands.fix_permissions import Command
7
7
 
8
8
  """
9
9
  Note:
@@ -81,6 +81,6 @@ class Migration(migrations.Migration):
81
81
 
82
82
  operations = [
83
83
  migrations.RunPython(add_reviewer_group, remove_reviewer_group),
84
- migrations.RunPython(fix_permissions, lambda x, y: None),
84
+ migrations.RunPython(fix_permissions, migrations.RunPython.noop),
85
85
  migrations.RunPython(add_admin_group, remove_admin_group),
86
86
  ]
@@ -0,0 +1,40 @@
1
+ # Generated by Django 2.2.6 on 2024-08-19 23:49
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+
10
+ dependencies = [('transcribe', '0017_auto_20191115_1123')]
11
+
12
+ operations = [
13
+ migrations.AlterField(
14
+ model_name='userpreferences',
15
+ name='user',
16
+ field=models.OneToOneField(
17
+ on_delete=django.db.models.deletion.CASCADE,
18
+ related_name='preferences',
19
+ to=settings.AUTH_USER_MODEL,
20
+ ),
21
+ ),
22
+ migrations.AlterField(
23
+ model_name='userprojectpreferences',
24
+ name='user',
25
+ field=models.ForeignKey(
26
+ on_delete=django.db.models.deletion.CASCADE,
27
+ related_name='projects',
28
+ to=settings.AUTH_USER_MODEL,
29
+ ),
30
+ ),
31
+ migrations.AlterField(
32
+ model_name='usertask',
33
+ name='user',
34
+ field=models.ForeignKey(
35
+ on_delete=django.db.models.deletion.CASCADE,
36
+ related_name='tasks',
37
+ to=settings.AUTH_USER_MODEL,
38
+ ),
39
+ ),
40
+ ]
@@ -0,0 +1,43 @@
1
+ # Generated by Django 2.2.6 on 2024-08-28 18:21
2
+
3
+ from django.conf import settings
4
+ from django.db import migrations, models
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+
9
+ dependencies = [
10
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
11
+ ('transcribe', '0018_point_fks_to_user'),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.DeleteModel(name='TranscribeUser'),
16
+ migrations.CreateModel(
17
+ name='TranscribeUser',
18
+ fields=[
19
+ (
20
+ 'id',
21
+ models.AutoField(
22
+ auto_created=True,
23
+ primary_key=True,
24
+ serialize=False,
25
+ verbose_name='ID',
26
+ ),
27
+ ),
28
+ (
29
+ 'user',
30
+ models.OneToOneField(
31
+ on_delete=models.deletion.CASCADE,
32
+ related_name='transcribe_user',
33
+ to=settings.AUTH_USER_MODEL,
34
+ ),
35
+ ),
36
+ ],
37
+ options={
38
+ 'verbose_name': 'Transcribe user',
39
+ 'verbose_name_plural': 'Transcribe users',
40
+ 'ordering': ['user__last_name', 'user__first_name'],
41
+ },
42
+ ),
43
+ ]
@@ -0,0 +1,18 @@
1
+ # Generated by Django 2.2.6 on 2024-08-20 15:59
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ def create_transcribe_users(apps, schema_editor):
7
+ User = apps.get_model('auth', 'User')
8
+ TranscribeUser = apps.get_model('transcribe', 'TranscribeUser')
9
+
10
+ for user in User.objects.all():
11
+ TranscribeUser.objects.create(user=user)
12
+
13
+
14
+ class Migration(migrations.Migration):
15
+
16
+ dependencies = [('transcribe', '0019_create_transcribeuser')]
17
+
18
+ operations = [migrations.RunPython(create_transcribe_users)]