django-nativemojo 0.1.10__py3-none-any.whl → 0.1.16__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_nativemojo-0.1.16.dist-info/METADATA +138 -0
- django_nativemojo-0.1.16.dist-info/RECORD +302 -0
- mojo/__init__.py +1 -1
- mojo/apps/account/management/__init__.py +5 -0
- mojo/apps/account/management/commands/__init__.py +6 -0
- mojo/apps/account/management/commands/serializer_admin.py +651 -0
- mojo/apps/account/migrations/0004_user_avatar.py +20 -0
- mojo/apps/account/migrations/0005_group_last_activity.py +18 -0
- mojo/apps/account/migrations/0006_add_device_tracking_models.py +72 -0
- mojo/apps/account/migrations/0007_delete_userdevicelocation.py +16 -0
- mojo/apps/account/migrations/0008_userdevicelocation.py +33 -0
- mojo/apps/account/migrations/0009_geolocatedip_subnet.py +18 -0
- mojo/apps/account/migrations/0010_group_avatar.py +20 -0
- mojo/apps/account/migrations/0011_user_org_registereddevice_pushconfig_and_more.py +118 -0
- mojo/apps/account/migrations/0012_remove_pushconfig_apns_key_file_and_more.py +21 -0
- mojo/apps/account/migrations/0013_pushconfig_test_mode_alter_pushconfig_apns_enabled_and_more.py +28 -0
- mojo/apps/account/migrations/0014_notificationdelivery_data_payload_and_more.py +48 -0
- mojo/apps/account/models/__init__.py +2 -0
- mojo/apps/account/models/device.py +281 -0
- mojo/apps/account/models/group.py +319 -15
- mojo/apps/account/models/member.py +29 -5
- mojo/apps/account/models/push/__init__.py +4 -0
- mojo/apps/account/models/push/config.py +112 -0
- mojo/apps/account/models/push/delivery.py +93 -0
- mojo/apps/account/models/push/device.py +66 -0
- mojo/apps/account/models/push/template.py +99 -0
- mojo/apps/account/models/user.py +369 -19
- mojo/apps/account/rest/__init__.py +2 -0
- mojo/apps/account/rest/device.py +39 -0
- mojo/apps/account/rest/group.py +9 -0
- mojo/apps/account/rest/push.py +187 -0
- mojo/apps/account/rest/user.py +100 -6
- mojo/apps/account/services/__init__.py +1 -0
- mojo/apps/account/services/push.py +363 -0
- mojo/apps/aws/migrations/0001_initial.py +206 -0
- mojo/apps/aws/migrations/0002_emaildomain_can_recv_emaildomain_can_send_and_more.py +28 -0
- mojo/apps/aws/migrations/0003_mailbox_is_domain_default_mailbox_is_system_default_and_more.py +31 -0
- mojo/apps/aws/migrations/0004_s3bucket.py +39 -0
- mojo/apps/aws/migrations/0005_alter_emaildomain_region_delete_s3bucket.py +21 -0
- mojo/apps/aws/models/__init__.py +19 -0
- mojo/apps/aws/models/email_attachment.py +99 -0
- mojo/apps/aws/models/email_domain.py +218 -0
- mojo/apps/aws/models/email_template.py +132 -0
- mojo/apps/aws/models/incoming_email.py +197 -0
- mojo/apps/aws/models/mailbox.py +288 -0
- mojo/apps/aws/models/sent_message.py +175 -0
- mojo/apps/aws/rest/__init__.py +7 -0
- mojo/apps/aws/rest/email.py +33 -0
- mojo/apps/aws/rest/email_ops.py +183 -0
- mojo/apps/aws/rest/messages.py +32 -0
- mojo/apps/aws/rest/s3.py +64 -0
- mojo/apps/aws/rest/send.py +101 -0
- mojo/apps/aws/rest/sns.py +403 -0
- mojo/apps/aws/rest/templates.py +19 -0
- mojo/apps/aws/services/__init__.py +32 -0
- mojo/apps/aws/services/email.py +390 -0
- mojo/apps/aws/services/email_ops.py +548 -0
- mojo/apps/docit/__init__.py +6 -0
- mojo/apps/docit/markdown_plugins/syntax_highlight.py +25 -0
- mojo/apps/docit/markdown_plugins/toc.py +12 -0
- mojo/apps/docit/migrations/0001_initial.py +113 -0
- mojo/apps/docit/migrations/0002_alter_book_modified_by_alter_page_modified_by.py +26 -0
- mojo/apps/docit/migrations/0003_alter_book_group.py +20 -0
- mojo/apps/docit/models/__init__.py +17 -0
- mojo/apps/docit/models/asset.py +231 -0
- mojo/apps/docit/models/book.py +227 -0
- mojo/apps/docit/models/page.py +319 -0
- mojo/apps/docit/models/page_revision.py +203 -0
- mojo/apps/docit/rest/__init__.py +10 -0
- mojo/apps/docit/rest/asset.py +17 -0
- mojo/apps/docit/rest/book.py +22 -0
- mojo/apps/docit/rest/page.py +22 -0
- mojo/apps/docit/rest/page_revision.py +17 -0
- mojo/apps/docit/services/__init__.py +11 -0
- mojo/apps/docit/services/docit.py +315 -0
- mojo/apps/docit/services/markdown.py +44 -0
- mojo/apps/fileman/README.md +8 -8
- mojo/apps/fileman/backends/base.py +76 -70
- mojo/apps/fileman/backends/filesystem.py +86 -86
- mojo/apps/fileman/backends/s3.py +409 -108
- mojo/apps/fileman/migrations/0001_initial.py +106 -0
- mojo/apps/fileman/migrations/0002_filemanager_parent_alter_filemanager_max_file_size.py +24 -0
- mojo/apps/fileman/migrations/0003_remove_file_fileman_fil_upload__c4bc35_idx_and_more.py +25 -0
- mojo/apps/fileman/migrations/0004_remove_file_original_filename_and_more.py +39 -0
- mojo/apps/fileman/migrations/0005_alter_file_upload_token.py +18 -0
- mojo/apps/fileman/migrations/0006_file_download_url_filemanager_forever_urls.py +23 -0
- mojo/apps/fileman/migrations/0007_remove_filemanager_forever_urls_and_more.py +22 -0
- mojo/apps/fileman/migrations/0008_file_category.py +18 -0
- mojo/apps/fileman/migrations/0009_rename_file_path_file_storage_file_path.py +18 -0
- mojo/apps/fileman/migrations/0010_filerendition.py +33 -0
- mojo/apps/fileman/migrations/0011_alter_filerendition_original_file.py +19 -0
- mojo/apps/fileman/models/__init__.py +1 -5
- mojo/apps/fileman/models/file.py +240 -58
- mojo/apps/fileman/models/manager.py +427 -31
- mojo/apps/fileman/models/rendition.py +118 -0
- mojo/apps/fileman/renderer/__init__.py +111 -0
- mojo/apps/fileman/renderer/audio.py +403 -0
- mojo/apps/fileman/renderer/base.py +205 -0
- mojo/apps/fileman/renderer/document.py +404 -0
- mojo/apps/fileman/renderer/image.py +222 -0
- mojo/apps/fileman/renderer/utils.py +297 -0
- mojo/apps/fileman/renderer/video.py +304 -0
- mojo/apps/fileman/rest/__init__.py +1 -18
- mojo/apps/fileman/rest/upload.py +22 -32
- mojo/apps/fileman/signals.py +58 -0
- mojo/apps/fileman/tasks.py +254 -0
- mojo/apps/fileman/utils/__init__.py +40 -16
- mojo/apps/incident/migrations/0005_incidenthistory.py +39 -0
- mojo/apps/incident/migrations/0006_alter_incident_state.py +18 -0
- mojo/apps/incident/migrations/0007_event_uid.py +18 -0
- mojo/apps/incident/migrations/0008_ticket_ticketnote.py +55 -0
- mojo/apps/incident/migrations/0009_incident_status.py +18 -0
- mojo/apps/incident/migrations/0010_event_country_code.py +18 -0
- mojo/apps/incident/migrations/0011_incident_country_code.py +18 -0
- mojo/apps/incident/migrations/0012_alter_incident_status.py +18 -0
- mojo/apps/incident/models/__init__.py +2 -0
- mojo/apps/incident/models/event.py +35 -0
- mojo/apps/incident/models/history.py +36 -0
- mojo/apps/incident/models/incident.py +3 -1
- mojo/apps/incident/models/ticket.py +62 -0
- mojo/apps/incident/reporter.py +21 -1
- mojo/apps/incident/rest/__init__.py +1 -0
- mojo/apps/incident/rest/event.py +7 -1
- mojo/apps/incident/rest/ticket.py +43 -0
- mojo/apps/jobs/__init__.py +489 -0
- mojo/apps/jobs/adapters.py +24 -0
- mojo/apps/jobs/cli.py +616 -0
- mojo/apps/jobs/daemon.py +370 -0
- mojo/apps/jobs/examples/sample_jobs.py +376 -0
- mojo/apps/jobs/examples/webhook_examples.py +203 -0
- mojo/apps/jobs/handlers/__init__.py +5 -0
- mojo/apps/jobs/handlers/webhook.py +317 -0
- mojo/apps/jobs/job_engine.py +734 -0
- mojo/apps/jobs/keys.py +203 -0
- mojo/apps/jobs/local_queue.py +363 -0
- mojo/apps/jobs/management/__init__.py +3 -0
- mojo/apps/jobs/management/commands/__init__.py +3 -0
- mojo/apps/jobs/manager.py +1327 -0
- mojo/apps/jobs/migrations/0001_initial.py +97 -0
- mojo/apps/jobs/migrations/0002_alter_job_max_retries_joblog.py +39 -0
- mojo/apps/jobs/models/__init__.py +6 -0
- mojo/apps/jobs/models/job.py +441 -0
- mojo/apps/jobs/rest/__init__.py +2 -0
- mojo/apps/jobs/rest/control.py +466 -0
- mojo/apps/jobs/rest/jobs.py +421 -0
- mojo/apps/jobs/scheduler.py +571 -0
- mojo/apps/jobs/services/__init__.py +6 -0
- mojo/apps/jobs/services/job_actions.py +465 -0
- mojo/apps/jobs/settings.py +209 -0
- mojo/apps/logit/migrations/0004_alter_log_level.py +18 -0
- mojo/apps/logit/models/log.py +7 -1
- mojo/apps/metrics/__init__.py +8 -1
- mojo/apps/metrics/redis_metrics.py +198 -0
- mojo/apps/metrics/rest/__init__.py +3 -0
- mojo/apps/metrics/rest/categories.py +266 -0
- mojo/apps/metrics/rest/helpers.py +48 -0
- mojo/apps/metrics/rest/permissions.py +99 -0
- mojo/apps/metrics/rest/values.py +277 -0
- mojo/apps/metrics/utils.py +19 -2
- mojo/decorators/auth.py +6 -1
- mojo/decorators/http.py +47 -3
- mojo/helpers/aws/__init__.py +45 -0
- mojo/helpers/aws/ec2.py +804 -0
- mojo/helpers/aws/iam.py +748 -0
- mojo/helpers/aws/inbound_email.py +309 -0
- mojo/helpers/aws/kms.py +413 -0
- mojo/helpers/aws/s3.py +451 -11
- mojo/helpers/aws/ses.py +483 -0
- mojo/helpers/aws/ses_domain.py +959 -0
- mojo/helpers/aws/sns.py +461 -0
- mojo/helpers/crypto/__init__.py +1 -1
- mojo/helpers/crypto/utils.py +15 -0
- mojo/helpers/dates.py +18 -0
- mojo/helpers/location/__init__.py +2 -0
- mojo/helpers/location/countries.py +262 -0
- mojo/helpers/location/geolocation.py +196 -0
- mojo/helpers/logit.py +37 -0
- mojo/helpers/redis/__init__.py +2 -0
- mojo/helpers/redis/adapter.py +606 -0
- mojo/helpers/redis/client.py +48 -0
- mojo/helpers/redis/pool.py +225 -0
- mojo/helpers/request.py +8 -0
- mojo/helpers/response.py +14 -2
- mojo/helpers/settings/__init__.py +2 -0
- mojo/helpers/{settings.py → settings/helper.py} +1 -37
- mojo/helpers/settings/parser.py +132 -0
- mojo/middleware/auth.py +1 -1
- mojo/middleware/cors.py +40 -0
- mojo/middleware/logging.py +131 -12
- mojo/middleware/mojo.py +10 -0
- mojo/models/rest.py +494 -65
- mojo/models/secrets.py +98 -3
- mojo/serializers/__init__.py +106 -0
- mojo/serializers/core/__init__.py +90 -0
- mojo/serializers/core/cache/__init__.py +121 -0
- mojo/serializers/core/cache/backends.py +518 -0
- mojo/serializers/core/cache/base.py +102 -0
- mojo/serializers/core/cache/disabled.py +181 -0
- mojo/serializers/core/cache/memory.py +287 -0
- mojo/serializers/core/cache/redis.py +533 -0
- mojo/serializers/core/cache/utils.py +454 -0
- mojo/serializers/core/manager.py +550 -0
- mojo/serializers/core/serializer.py +475 -0
- mojo/serializers/examples/settings.py +322 -0
- mojo/serializers/formats/csv.py +393 -0
- mojo/serializers/formats/localizers.py +509 -0
- mojo/serializers/{models.py → simple.py} +38 -15
- mojo/serializers/suggested_improvements.md +388 -0
- testit/client.py +1 -1
- testit/helpers.py +35 -4
- testit/runner.py +23 -6
- django_nativemojo-0.1.10.dist-info/METADATA +0 -96
- django_nativemojo-0.1.10.dist-info/RECORD +0 -194
- mojo/apps/metrics/rest/db.py +0 -0
- mojo/apps/notify/README.md +0 -91
- mojo/apps/notify/README_NOTIFICATIONS.md +0 -566
- mojo/apps/notify/admin.py +0 -52
- mojo/apps/notify/handlers/example_handlers.py +0 -516
- mojo/apps/notify/handlers/ses/__init__.py +0 -25
- mojo/apps/notify/handlers/ses/bounce.py +0 -0
- mojo/apps/notify/handlers/ses/complaint.py +0 -25
- mojo/apps/notify/handlers/ses/message.py +0 -86
- mojo/apps/notify/management/commands/__init__.py +0 -1
- mojo/apps/notify/management/commands/process_notifications.py +0 -370
- mojo/apps/notify/mod +0 -0
- mojo/apps/notify/models/__init__.py +0 -12
- mojo/apps/notify/models/account.py +0 -128
- mojo/apps/notify/models/attachment.py +0 -24
- mojo/apps/notify/models/bounce.py +0 -68
- mojo/apps/notify/models/complaint.py +0 -40
- mojo/apps/notify/models/inbox.py +0 -113
- mojo/apps/notify/models/inbox_message.py +0 -173
- mojo/apps/notify/models/outbox.py +0 -129
- mojo/apps/notify/models/outbox_message.py +0 -288
- mojo/apps/notify/models/template.py +0 -30
- mojo/apps/notify/providers/aws.py +0 -73
- mojo/apps/notify/rest/ses.py +0 -0
- mojo/apps/notify/utils/__init__.py +0 -2
- mojo/apps/notify/utils/notifications.py +0 -404
- mojo/apps/notify/utils/parsing.py +0 -202
- mojo/apps/notify/utils/render.py +0 -144
- mojo/apps/tasks/README.md +0 -118
- mojo/apps/tasks/__init__.py +0 -11
- mojo/apps/tasks/manager.py +0 -489
- mojo/apps/tasks/rest/__init__.py +0 -2
- mojo/apps/tasks/rest/hooks.py +0 -0
- mojo/apps/tasks/rest/tasks.py +0 -62
- mojo/apps/tasks/runner.py +0 -174
- mojo/apps/tasks/tq_handlers.py +0 -14
- mojo/helpers/aws/setup_email.py +0 -0
- mojo/helpers/redis.py +0 -10
- mojo/models/meta.py +0 -262
- mojo/ws4redis/README.md +0 -174
- mojo/ws4redis/__init__.py +0 -2
- mojo/ws4redis/client.py +0 -283
- mojo/ws4redis/connection.py +0 -327
- mojo/ws4redis/exceptions.py +0 -32
- mojo/ws4redis/redis.py +0 -183
- mojo/ws4redis/servers/base.py +0 -86
- mojo/ws4redis/servers/django.py +0 -171
- mojo/ws4redis/servers/uwsgi.py +0 -63
- mojo/ws4redis/settings.py +0 -45
- mojo/ws4redis/utf8validator.py +0 -128
- mojo/ws4redis/websocket.py +0 -403
- {django_nativemojo-0.1.10.dist-info → django_nativemojo-0.1.16.dist-info}/LICENSE +0 -0
- {django_nativemojo-0.1.10.dist-info → django_nativemojo-0.1.16.dist-info}/NOTICE +0 -0
- {django_nativemojo-0.1.10.dist-info → django_nativemojo-0.1.16.dist-info}/WHEEL +0 -0
- /mojo/apps/{notify → aws}/__init__.py +0 -0
- /mojo/apps/{notify/handlers → aws/migrations}/__init__.py +0 -0
- /mojo/apps/{notify/management → docit/markdown_plugins}/__init__.py +0 -0
- /mojo/apps/{notify/providers → docit/migrations}/__init__.py +0 -0
- /mojo/apps/{notify/rest → fileman/migrations}/__init__.py +0 -0
- /mojo/{ws4redis/servers → apps/jobs/examples}/__init__.py +0 -0
- /mojo/apps/{fileman/models/render.py → jobs/migrations/__init__.py} +0 -0
- /mojo/{serializers → rest}/openapi.py +0 -0
- /mojo/{apps/fileman/rest/__init__ → serializers/formats/__init__.py} +0 -0
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-07 13:32
|
2
|
+
|
3
|
+
from django.conf import settings
|
4
|
+
from django.db import migrations, models
|
5
|
+
import django.db.models.deletion
|
6
|
+
import mojo.models.rest
|
7
|
+
|
8
|
+
|
9
|
+
class Migration(migrations.Migration):
|
10
|
+
|
11
|
+
initial = True
|
12
|
+
|
13
|
+
dependencies = [
|
14
|
+
('account', '0003_group_mojo_secrets_user_mojo_secrets'),
|
15
|
+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
16
|
+
]
|
17
|
+
|
18
|
+
operations = [
|
19
|
+
migrations.CreateModel(
|
20
|
+
name='FileManager',
|
21
|
+
fields=[
|
22
|
+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
23
|
+
('mojo_secrets', models.TextField(blank=True, default=None, null=True)),
|
24
|
+
('created', models.DateTimeField(auto_now_add=True, db_index=True)),
|
25
|
+
('modified', models.DateTimeField(auto_now=True)),
|
26
|
+
('name', models.CharField(db_index=True, help_text='Descriptive name for this file manager configuration', max_length=255)),
|
27
|
+
('description', models.TextField(blank=True, default='', help_text="Optional description of this file manager's purpose")),
|
28
|
+
('backend_type', models.CharField(choices=[('file', 'File System'), ('s3', 'AWS S3'), ('azure', 'Azure Blob Storage'), ('gcs', 'Google Cloud Storage'), ('custom', 'Custom Backend')], db_index=True, help_text='Type of storage backend (file, s3, azure, gcs, custom)', max_length=32)),
|
29
|
+
('backend_url', models.CharField(help_text='Base URL or connection string for the storage backend', max_length=500)),
|
30
|
+
('supports_direct_upload', models.BooleanField(default=False, help_text='Whether this backend supports direct upload (pre-signed URLs)')),
|
31
|
+
('max_file_size', models.BigIntegerField(default=104857600, help_text='Maximum file size in bytes (0 for unlimited)')),
|
32
|
+
('allowed_extensions', models.JSONField(blank=True, default=list, help_text='List of allowed file extensions (empty for all)')),
|
33
|
+
('allowed_mime_types', models.JSONField(blank=True, default=list, help_text='List of allowed MIME types (empty for all)')),
|
34
|
+
('is_active', models.BooleanField(default=True, help_text='Whether this file manager is active and can be used')),
|
35
|
+
('is_default', models.BooleanField(default=False, help_text='Whether this is the default file manager for the group or user')),
|
36
|
+
('group', models.ForeignKey(blank=True, default=None, help_text='Group that owns this file manager configuration', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='file_managers', to='account.group')),
|
37
|
+
('user', models.ForeignKey(blank=True, default=None, help_text='User that owns this file manager configuration', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='file_managers', to=settings.AUTH_USER_MODEL)),
|
38
|
+
],
|
39
|
+
bases=(models.Model, mojo.models.rest.MojoModel),
|
40
|
+
),
|
41
|
+
migrations.CreateModel(
|
42
|
+
name='File',
|
43
|
+
fields=[
|
44
|
+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
45
|
+
('created', models.DateTimeField(auto_now_add=True, db_index=True)),
|
46
|
+
('modified', models.DateTimeField(auto_now=True)),
|
47
|
+
('filename', models.CharField(db_index=True, help_text='Final filename used for storage', max_length=255)),
|
48
|
+
('original_filename', models.CharField(help_text='Original filename as uploaded by user', max_length=255)),
|
49
|
+
('file_path', models.TextField(help_text='Full path to file in storage backend')),
|
50
|
+
('file_size', models.BigIntegerField(blank=True, help_text='File size in bytes', null=True)),
|
51
|
+
('content_type', models.CharField(db_index=True, help_text='MIME type of the file', max_length=255)),
|
52
|
+
('checksum', models.CharField(blank=True, default='', help_text='File checksum (MD5, SHA256, etc.)', max_length=128)),
|
53
|
+
('upload_token', models.CharField(db_index=True, help_text='Unique token for tracking direct uploads', max_length=64, unique=True)),
|
54
|
+
('upload_status', models.CharField(choices=[('pending', 'Pending Upload'), ('uploading', 'Uploading'), ('completed', 'Upload Completed'), ('failed', 'Upload Failed'), ('expired', 'Upload Expired')], db_index=True, default='pending', help_text='Current status of the file upload', max_length=32)),
|
55
|
+
('upload_url', models.TextField(blank=True, default='', help_text='Pre-signed URL for direct upload (temporary)')),
|
56
|
+
('upload_expires_at', models.DateTimeField(blank=True, help_text='When the upload URL expires', null=True)),
|
57
|
+
('metadata', models.JSONField(blank=True, default=dict, help_text='Additional file metadata and custom properties')),
|
58
|
+
('is_active', models.BooleanField(default=True, help_text='Whether this file is active and accessible')),
|
59
|
+
('is_public', models.BooleanField(default=False, help_text='Whether this file can be accessed without authentication')),
|
60
|
+
('file_manager', models.ForeignKey(help_text='File manager configuration used for this file', on_delete=django.db.models.deletion.CASCADE, related_name='files', to='fileman.filemanager')),
|
61
|
+
('group', models.ForeignKey(blank=True, default=None, help_text='Group that owns this file', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='files', to='account.group')),
|
62
|
+
('uploaded_by', models.ForeignKey(blank=True, default=None, help_text='User who uploaded this file', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='uploaded_files', to=settings.AUTH_USER_MODEL)),
|
63
|
+
],
|
64
|
+
bases=(models.Model, mojo.models.rest.MojoModel),
|
65
|
+
),
|
66
|
+
migrations.AddIndex(
|
67
|
+
model_name='filemanager',
|
68
|
+
index=models.Index(fields=['backend_type', 'is_active'], name='fileman_fil_backend_d27c68_idx'),
|
69
|
+
),
|
70
|
+
migrations.AddIndex(
|
71
|
+
model_name='filemanager',
|
72
|
+
index=models.Index(fields=['group', 'is_default'], name='fileman_fil_group_i_c1c47d_idx'),
|
73
|
+
),
|
74
|
+
migrations.AddIndex(
|
75
|
+
model_name='filemanager',
|
76
|
+
index=models.Index(fields=['user', 'is_default'], name='fileman_fil_user_id_525e54_idx'),
|
77
|
+
),
|
78
|
+
migrations.AddIndex(
|
79
|
+
model_name='filemanager',
|
80
|
+
index=models.Index(fields=['group', 'backend_type'], name='fileman_fil_group_i_3f1fc6_idx'),
|
81
|
+
),
|
82
|
+
migrations.AlterUniqueTogether(
|
83
|
+
name='filemanager',
|
84
|
+
unique_together={('group', 'name')},
|
85
|
+
),
|
86
|
+
migrations.AddIndex(
|
87
|
+
model_name='file',
|
88
|
+
index=models.Index(fields=['upload_status', 'created'], name='fileman_fil_upload__64e176_idx'),
|
89
|
+
),
|
90
|
+
migrations.AddIndex(
|
91
|
+
model_name='file',
|
92
|
+
index=models.Index(fields=['file_manager', 'upload_status'], name='fileman_fil_file_ma_765f1a_idx'),
|
93
|
+
),
|
94
|
+
migrations.AddIndex(
|
95
|
+
model_name='file',
|
96
|
+
index=models.Index(fields=['group', 'is_active'], name='fileman_fil_group_i_4d4a8a_idx'),
|
97
|
+
),
|
98
|
+
migrations.AddIndex(
|
99
|
+
model_name='file',
|
100
|
+
index=models.Index(fields=['content_type', 'is_active'], name='fileman_fil_content_c5b4a6_idx'),
|
101
|
+
),
|
102
|
+
migrations.AddIndex(
|
103
|
+
model_name='file',
|
104
|
+
index=models.Index(fields=['upload_expires_at'], name='fileman_fil_upload__c4bc35_idx'),
|
105
|
+
),
|
106
|
+
]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-07 20:02
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
import django.db.models.deletion
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
('fileman', '0001_initial'),
|
11
|
+
]
|
12
|
+
|
13
|
+
operations = [
|
14
|
+
migrations.AddField(
|
15
|
+
model_name='filemanager',
|
16
|
+
name='parent',
|
17
|
+
field=models.ForeignKey(blank=True, help_text='Used if this file manager is a child of another file manager, and inherits settings from its parent', null=True, on_delete=django.db.models.deletion.CASCADE, to='fileman.filemanager'),
|
18
|
+
),
|
19
|
+
migrations.AlterField(
|
20
|
+
model_name='filemanager',
|
21
|
+
name='max_file_size',
|
22
|
+
field=models.BigIntegerField(default=1048576000, help_text='Maximum file size in bytes (0 for unlimited)'),
|
23
|
+
),
|
24
|
+
]
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 04:49
|
2
|
+
|
3
|
+
from django.db import migrations
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0002_filemanager_parent_alter_filemanager_max_file_size'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.RemoveIndex(
|
14
|
+
model_name='file',
|
15
|
+
name='fileman_fil_upload__c4bc35_idx',
|
16
|
+
),
|
17
|
+
migrations.RemoveField(
|
18
|
+
model_name='file',
|
19
|
+
name='upload_expires_at',
|
20
|
+
),
|
21
|
+
migrations.RemoveField(
|
22
|
+
model_name='file',
|
23
|
+
name='upload_url',
|
24
|
+
),
|
25
|
+
]
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 05:14
|
2
|
+
|
3
|
+
from django.conf import settings
|
4
|
+
from django.db import migrations, models
|
5
|
+
import django.db.models.deletion
|
6
|
+
|
7
|
+
|
8
|
+
class Migration(migrations.Migration):
|
9
|
+
|
10
|
+
dependencies = [
|
11
|
+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
12
|
+
('fileman', '0003_remove_file_fileman_fil_upload__c4bc35_idx_and_more'),
|
13
|
+
]
|
14
|
+
|
15
|
+
operations = [
|
16
|
+
migrations.RemoveField(
|
17
|
+
model_name='file',
|
18
|
+
name='original_filename',
|
19
|
+
),
|
20
|
+
migrations.RemoveField(
|
21
|
+
model_name='file',
|
22
|
+
name='uploaded_by',
|
23
|
+
),
|
24
|
+
migrations.AddField(
|
25
|
+
model_name='file',
|
26
|
+
name='storage_filename',
|
27
|
+
field=models.CharField(blank=True, default=None, help_text='Storage filename', max_length=255, null=True),
|
28
|
+
),
|
29
|
+
migrations.AddField(
|
30
|
+
model_name='file',
|
31
|
+
name='user',
|
32
|
+
field=models.ForeignKey(blank=True, default=None, help_text='User who uploaded this file', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to=settings.AUTH_USER_MODEL),
|
33
|
+
),
|
34
|
+
migrations.AlterField(
|
35
|
+
model_name='file',
|
36
|
+
name='filename',
|
37
|
+
field=models.CharField(db_index=True, help_text='User-provided filename', max_length=255),
|
38
|
+
),
|
39
|
+
]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 12:55
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0004_remove_file_original_filename_and_more'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.AlterField(
|
14
|
+
model_name='file',
|
15
|
+
name='upload_token',
|
16
|
+
field=models.CharField(db_index=True, help_text='Unique token for tracking direct uploads', max_length=64),
|
17
|
+
),
|
18
|
+
]
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 13:25
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0005_alter_file_upload_token'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.AddField(
|
14
|
+
model_name='file',
|
15
|
+
name='download_url',
|
16
|
+
field=models.TextField(blank=True, default=None, help_text='Persistent URL for downloading the file, (if allowed)', null=True),
|
17
|
+
),
|
18
|
+
migrations.AddField(
|
19
|
+
model_name='filemanager',
|
20
|
+
name='forever_urls',
|
21
|
+
field=models.BooleanField(default=False, help_text='Allow URLs to be permanent and not expire'),
|
22
|
+
),
|
23
|
+
]
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 16:40
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0006_file_download_url_filemanager_forever_urls'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.RemoveField(
|
14
|
+
model_name='filemanager',
|
15
|
+
name='forever_urls',
|
16
|
+
),
|
17
|
+
migrations.AddField(
|
18
|
+
model_name='filemanager',
|
19
|
+
name='is_public',
|
20
|
+
field=models.BooleanField(default=True, help_text='Whether this allows public access to the files'),
|
21
|
+
),
|
22
|
+
]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 16:59
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0007_remove_filemanager_forever_urls_and_more'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.AddField(
|
14
|
+
model_name='file',
|
15
|
+
name='category',
|
16
|
+
field=models.CharField(blank=True, db_index=True, default=None, help_text="A category for the file, like 'image', 'document', 'video', etc.", max_length=255, null=True),
|
17
|
+
),
|
18
|
+
]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-08 17:32
|
2
|
+
|
3
|
+
from django.db import migrations
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('fileman', '0008_file_category'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.RenameField(
|
14
|
+
model_name='file',
|
15
|
+
old_name='file_path',
|
16
|
+
new_name='storage_file_path',
|
17
|
+
),
|
18
|
+
]
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-09 03:49
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
import django.db.models.deletion
|
5
|
+
import mojo.models.rest
|
6
|
+
|
7
|
+
|
8
|
+
class Migration(migrations.Migration):
|
9
|
+
|
10
|
+
dependencies = [
|
11
|
+
('fileman', '0009_rename_file_path_file_storage_file_path'),
|
12
|
+
]
|
13
|
+
|
14
|
+
operations = [
|
15
|
+
migrations.CreateModel(
|
16
|
+
name='FileRendition',
|
17
|
+
fields=[
|
18
|
+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
19
|
+
('created', models.DateTimeField(auto_now_add=True, db_index=True)),
|
20
|
+
('modified', models.DateTimeField(auto_now=True)),
|
21
|
+
('filename', models.CharField(db_index=True, help_text='rendition filename', max_length=255)),
|
22
|
+
('storage_path', models.TextField(help_text='Storage path and filename')),
|
23
|
+
('download_url', models.TextField(blank=True, default=None, help_text='Persistent URL for downloading the file, (if allowed)', null=True)),
|
24
|
+
('file_size', models.BigIntegerField(blank=True, help_text='File size in bytes', null=True)),
|
25
|
+
('content_type', models.CharField(help_text='MIME type of the file', max_length=255)),
|
26
|
+
('category', models.CharField(help_text="A category for the file, like 'image', 'document', 'video', etc.", max_length=255)),
|
27
|
+
('role', models.CharField(db_index=True, help_text="The role of the file, like 'thumbnail', 'preview', 'full', etc.", max_length=255)),
|
28
|
+
('upload_status', models.CharField(db_index=True, default='pending', help_text='Current status of rendering', max_length=32)),
|
29
|
+
('original_file', models.ForeignKey(help_text='The parent file', on_delete=django.db.models.deletion.CASCADE, related_name='renditions', to='fileman.file')),
|
30
|
+
],
|
31
|
+
bases=(models.Model, mojo.models.rest.MojoModel),
|
32
|
+
),
|
33
|
+
]
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Generated by Django 4.2.21 on 2025-06-09 05:37
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
import django.db.models.deletion
|
5
|
+
|
6
|
+
|
7
|
+
class Migration(migrations.Migration):
|
8
|
+
|
9
|
+
dependencies = [
|
10
|
+
('fileman', '0010_filerendition'),
|
11
|
+
]
|
12
|
+
|
13
|
+
operations = [
|
14
|
+
migrations.AlterField(
|
15
|
+
model_name='filerendition',
|
16
|
+
name='original_file',
|
17
|
+
field=models.ForeignKey(help_text='The parent file', on_delete=django.db.models.deletion.CASCADE, related_name='file_renditions', to='fileman.file'),
|
18
|
+
),
|
19
|
+
]
|