优化文档默认排序值

This commit is contained in:
zmister 2021-10-13 10:26:23 +08:00
parent 3c4e0168af
commit f6885b39bf
5 changed files with 28 additions and 4 deletions

View File

@ -1,5 +1,11 @@
## 版本更新记录
### v0.7.2 2021-10
- [新增]个人中心本地文档批量导入到文集功能;
- [优化]「草稿」状态的文档可通过文档浏览URL预览草稿文档内容
- [优化]文档排序值默认调整为9999
### v0.7.1 2021-09-29
- [新增]安全报告SECURITY.md

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2021-10-13 10:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_doc', '0038_project_is_top'),
]
operations = [
migrations.AlterField(
model_name='doc',
name='sort',
field=models.IntegerField(default=9999, verbose_name='排序'),
),
]

View File

@ -70,7 +70,7 @@ class Doc(models.Model):
content = models.TextField(verbose_name="文档内容",null=True,blank=True)
parent_doc = models.IntegerField(default=0,verbose_name="上级文档")
top_doc = models.IntegerField(default=0,verbose_name="所属项目")
sort = models.IntegerField(verbose_name='排序',default=99)
sort = models.IntegerField(verbose_name='排序',default=9999)
create_user = models.ForeignKey(User,on_delete=models.CASCADE)
create_time = models.DateTimeField(auto_now_add=True)
modify_time = models.DateTimeField(auto_now=True)

View File

@ -1226,7 +1226,7 @@ def create_doc(request):
pre_content= pre_content,
parent_doc= int(parent_doc) if parent_doc != '' else 0,
top_doc= int(project),
sort = sort if sort != '' else 99,
sort = sort if sort != '' else 9999,
create_user=request.user,
status = status,
editor_mode = editor_mode,
@ -1345,7 +1345,7 @@ def modify_doc(request,doc_id):
content=doc_content,
pre_content=pre_content,
parent_doc=int(parent_doc) if parent_doc != '' else 0,
sort=sort if sort != '' else 99,
sort=sort if sort != '' else 9999,
modify_time = datetime.datetime.now(),
status = status,
editor_mode = editor_mode,

View File

@ -115,7 +115,7 @@
<input type="text" id="parent-doc" hidden>
</div>
<div class="layui-col-md12">
<input type="number" class="layui-input" placeholder="输入文档排序值默认99" id="sort">
<input type="number" class="layui-input" placeholder="输入文档排序值默认9999" id="sort">
</div>
</div>