예제 #1
0
 class Meta:
     swagger_schema_fields = {
         "type": openapi.TYPE_STRING,
         "example": "http://www.zhihu.com/321312321",
         "title": "记录id 为reoce表里的url",
         "max_length": _Getmodel.model_getattr(model_obj=models.Metadata, field='recode_id', attr='max_length')
     }
예제 #2
0
 class Meta:
     swagger_schema_fields = {
         "type":
         openapi.TYPE_STRING,
         "example":
         "http://www.zhihu.com/321312321",
         "title":
         "记录地址",
         "max_length":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='url',
                                 attr='max_length'),
         "allow_null":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='url',
                                 attr='null'),
         "allow_blank":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='url',
                                 attr='blank')
     }
예제 #3
0
 class Meta:
     swagger_schema_fields = {
         "type":
         openapi.TYPE_STRING,
         "example":
         "1",
         "title":
         "记录频道",
         "max_length":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='channel',
                                 attr='max_length'),
         "allow_null":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='channel',
                                 attr='null'),
         "allow_blank":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='channel',
                                 attr='blank')
     }
예제 #4
0
 class Meta:
     swagger_schema_fields = {
         "type":
         openapi.TYPE_STRING,
         "example":
         "www.zhihu.com",
         "title":
         "记录Domain",
         "max_length":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='domain',
                                 attr='max_length')
     }
예제 #5
0
 class Meta:
     swagger_schema_fields = {
         "type":
         openapi.TYPE_STRING,
         "example":
         "如何评价XXXXX",
         "title":
         "记录标题",
         "max_length":
         _Getmodel.model_getattr(model_obj=models.Recode,
                                 field='title',
                                 attr='max_length'),
     }
예제 #6
0
 class Meta:
     swagger_schema_fields = {
         "type": openapi.TYPE_STRING,
         "example": "tags",
         "max_length": _Getmodel.model_getattr(model_obj=models.Metadata, field='metadata_name', attr='max_length')
     }