You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
671 B
29 lines
671 B
5 days ago
|
from rest_framework import viewsets
|
||
|
from product.serializers import *
|
||
|
|
||
|
|
||
|
# Create your views here.
|
||
|
class ProjectViewSet(viewsets.ModelViewSet):
|
||
|
# 字段注释
|
||
|
"""
|
||
|
id: 数据id
|
||
|
project_name: 项目名称
|
||
|
is_delete: 删除标记
|
||
|
"""
|
||
|
queryset = Project.objects.all()
|
||
|
serializer_class = ProjectSerializer
|
||
|
|
||
|
|
||
|
class PrdItemViewSet(viewsets.ModelViewSet):
|
||
|
# 字段注释
|
||
|
"""
|
||
|
id: 数据id
|
||
|
project: 项目名称
|
||
|
prd_version: 版本
|
||
|
prd_doc_link: 产品文档链接 json格式
|
||
|
prd_comment: 产品文档说明
|
||
|
is_delete: 删除标记
|
||
|
"""
|
||
|
queryset = PrdItem.objects.all()
|
||
|
serializer_class = PrdItemSerializer
|