-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from rufener/document2
Document with filefield
- Loading branch information
Showing
18 changed files
with
366 additions
and
373 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
..._backend/ne_sop_api/migrations/0019_alter_document_author_alter_document_item_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 4.2.8 on 2023-12-19 08:04 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ne_sop_api', '0018_document_author_document_size_alter_event_time'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='document', | ||
name='author', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ne_sop_api.entity'), | ||
), | ||
migrations.AlterField( | ||
model_name='document', | ||
name='item', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='ne_sop_api.item'), | ||
), | ||
migrations.CreateModel( | ||
name='NewDocument', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)), | ||
('created', models.DateTimeField(auto_now_add=True)), | ||
('note', models.CharField(blank=True, default='', max_length=500)), | ||
('filename', models.CharField(default=None, max_length=200)), | ||
('version', models.PositiveIntegerField(default=None)), | ||
('size', models.PositiveIntegerField(default=0)), | ||
('file', models.FileField(upload_to='')), | ||
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ne_sop_api.entity')), | ||
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item_documents', to='ne_sop_api.item')), | ||
('template', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ne_sop_api.template')), | ||
], | ||
options={ | ||
'ordering': ['created'], | ||
}, | ||
), | ||
] |
14 changes: 14 additions & 0 deletions
14
back/ne_sop_backend/ne_sop_api/migrations/0020_merge_20231220_1010.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 4.2.8 on 2023-12-20 09:10 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ne_sop_api', '0019_alter_document_author_alter_document_item_and_more'), | ||
('ne_sop_api', '0019_item_enddate_item_startdate_alter_document_author'), | ||
] | ||
|
||
operations = [ | ||
] |
14 changes: 14 additions & 0 deletions
14
...op_backend/ne_sop_api/migrations/0021_merge_0020_entity_users_0020_merge_20231220_1010.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 4.2.8 on 2023-12-21 07:18 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ne_sop_api', '0020_entity_users'), | ||
('ne_sop_api', '0020_merge_20231220_1010'), | ||
] | ||
|
||
operations = [ | ||
] |
51 changes: 51 additions & 0 deletions
51
...kend/ne_sop_api/migrations/0022_remove_document_relpath_remove_document_valid_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Generated by Django 4.2.8 on 2023-12-21 15:36 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import ne_sop_api.utils | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('ne_sop_api', '0021_merge_0020_entity_users_0020_merge_20231220_1010'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='Document', | ||
), | ||
migrations.RenameModel('NewDocument', 'Document'), | ||
migrations.AlterField( | ||
model_name='entity', | ||
name='type', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='ne_sop_api.entitytype'), | ||
), | ||
migrations.AlterField( | ||
model_name='entity', | ||
name='users', | ||
field=models.ManyToManyField(blank=True, related_name='users', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AlterField( | ||
model_name='event', | ||
name='type', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='ne_sop_api.eventtype'), | ||
), | ||
migrations.AlterField( | ||
model_name='item', | ||
name='status', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='ne_sop_api.itemstatus'), | ||
), | ||
migrations.AlterField( | ||
model_name='item', | ||
name='support', | ||
field=models.ManyToManyField(blank=True, related_name='item', to='ne_sop_api.entity'), | ||
), | ||
migrations.AlterField( | ||
model_name='item', | ||
name='type', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='ne_sop_api.itemtype'), | ||
), | ||
] |
31 changes: 31 additions & 0 deletions
31
...op_backend/ne_sop_api/migrations/0023_alter_document_file_alter_document_item_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 4.2.8 on 2023-12-22 14:48 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import ne_sop_api.utils | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('ne_sop_api', '0022_remove_document_relpath_remove_document_valid_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='document', | ||
name='file', | ||
field=models.FileField(upload_to=ne_sop_api.utils.Utils.get_upload_path), | ||
), | ||
migrations.AlterField( | ||
model_name='document', | ||
name='item', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='ne_sop_api.item'), | ||
), | ||
migrations.AlterField( | ||
model_name='item', | ||
name='created', | ||
field=models.DateTimeField(auto_now_add=True, default='2023-12-22 15:48:00'), | ||
preserve_default=False, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.