do not require related document
This commit is contained in:
parent
6c9e07df73
commit
3af8a7e1a6
2 changed files with 19 additions and 1 deletions
18
sdbs_pile/pile/migrations/0012_auto_20200610_1013.py
Normal file
18
sdbs_pile/pile/migrations/0012_auto_20200610_1013.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 3.0.4 on 2020-06-10 08:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('pile', '0011_document_related'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='document',
|
||||||
|
name='related',
|
||||||
|
field=models.ManyToManyField(blank=True, related_name='_document_related_+', to='pile.Document'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -57,7 +57,7 @@ class Document(SoftDeletableModel):
|
||||||
max_length=3, choices=DocumentStatus.choices, default=DocumentStatus.STANDARD)
|
max_length=3, choices=DocumentStatus.choices, default=DocumentStatus.STANDARD)
|
||||||
tags = models.ManyToManyField(Tag, related_name="documents", blank=True)
|
tags = models.ManyToManyField(Tag, related_name="documents", blank=True)
|
||||||
uploaded = models.DateTimeField(auto_now_add=True, null=True)
|
uploaded = models.DateTimeField(auto_now_add=True, null=True)
|
||||||
related = models.ManyToManyField('self', related_name='related')
|
related = models.ManyToManyField('self', related_name='related', blank=True)
|
||||||
|
|
||||||
objects = DocumentManager()
|
objects = DocumentManager()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue