Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
search_tips
Commits
3152ea7d
Commit
3152ea7d
authored
Jun 27, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增新标签的联想词
parent
d999f823
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
43 deletions
+12
-43
agile_tag.py
associate/models/agile_tag.py
+9
-40
type_info.py
associate/type_info.py
+3
-3
No files found.
associate/models/agile_tag.py
View file @
3152ea7d
...
...
@@ -6,12 +6,12 @@ import logging
import
traceback
import
base64
from
django.db
import
models
#
from gm_types.gaia import (
#
AGILE_TAG_TYPE,
#
AGILE_TAG_CREATE_TYPE,
#
AGILE_TAG_STYLE,
#
AGILE_TAG_RECOMMEND_TYPE,
#
)
from
gm_types.gaia
import
(
AGILE_TAG_TYPE
,
AGILE_TAG_CREATE_TYPE
,
AGILE_TAG_STYLE
,
AGILE_TAG_RECOMMEND_TYPE
,
)
class
BaseModel
(
models
.
Model
):
...
...
@@ -31,8 +31,8 @@ class AgileTag(BaseModel):
name
=
models
.
CharField
(
verbose_name
=
u'新标签名字'
,
max_length
=
128
,
null
=
False
,
unique
=
True
,
default
=
''
)
description
=
models
.
TextField
(
verbose_name
=
u'描述'
,
default
=
''
)
create_tag_type
=
models
.
CharField
(
verbose_name
=
u"标签创建类型"
,
max_length
=
3
,
choices
=
1
)
style
=
models
.
CharField
(
verbose_name
=
u"标签样式"
,
max_length
=
3
,
choices
=
1
)
create_tag_type
=
models
.
CharField
(
verbose_name
=
u"标签创建类型"
,
max_length
=
3
,
choices
=
AGILE_TAG_CREATE_TYPE
)
style
=
models
.
CharField
(
verbose_name
=
u"标签样式"
,
max_length
=
3
,
choices
=
AGILE_TAG_STYLE
)
topic_recommend_sort
=
models
.
IntegerField
(
verbose_name
=
u'帖子推荐排序'
,
default
=
9999
)
...
...
@@ -43,7 +43,7 @@ class AgileTagType(BaseModel):
app_label
=
'api'
agile_tag_id
=
models
.
IntegerField
(
verbose_name
=
u'新标签'
,
db_index
=
True
)
agile_tag_type
=
models
.
CharField
(
verbose_name
=
u"标签类型"
,
max_length
=
3
,
choices
=
1
)
agile_tag_type
=
models
.
CharField
(
verbose_name
=
u"标签类型"
,
max_length
=
3
,
choices
=
AGILE_TAG_TYPE
)
@property
def
get_by_id_name
(
self
):
...
...
@@ -54,34 +54,3 @@ class AgileTagType(BaseModel):
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
{}
# class AgileTagRecommendType(BaseModel):
# class Meta:
# verbose_name = u'新标签推荐类型(可多选)'
# db_table = 'api_agile_tag_recommend_type'
# app_label = 'api'
#
# agile_tag_id = models.IntegerField(verbose_name=u'新标签', db_index=True)
# agile_tag_type = models.CharField(verbose_name=u"标签推荐类型", max_length=3, choices=AGILE_TAG_RECOMMEND_TYPE)
#
# class AgileTagMapping(BaseModel):
# class Meta:
# verbose_name = u'新标签与老标签映射关系(可多选)'
# db_table = 'api_agile_tag_mapping'
# app_label = 'api'
#
# agile_tag_id = models.IntegerField(verbose_name=u'新标签', db_index=True)
# old_tag_id = models.IntegerField(verbose_name=u'老标签', db_index=True)
#
# class AgileTagRelationPolymer(BaseModel):
# class Meta:
# verbose_name = u'新标签关联的内容聚合页(可多选)'
# db_table = 'api_agile_tag_relation_polymer'
# app_label = 'api'
#
# agile_tag_id = models.IntegerField(verbose_name=u'新标签', db_index=True)
# polymer_id = models.IntegerField(verbose_name=u'聚合页id', db_index=True)
associate/type_info.py
View file @
3152ea7d
...
...
@@ -10,9 +10,9 @@ import copy
from
libs.es
import
ESPerform
from
associate.models
import
agile_tag
from
associate.utils.agile_tag_transfer
import
TagTransfer
#
from gm_types.gaia import (
#
AGILE_TAG_TYPE,
#
)
from
gm_types.gaia
import
(
AGILE_TAG_TYPE
,
)
__es
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment