Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
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
钟尚武
physical
Commits
85a9ea27
Commit
85a9ea27
authored
Feb 14, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify recommend rank
parent
5b2ccd2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
trans2es_data2es_parallel.py
trans2es/management/commands/trans2es_data2es_parallel.py
+6
-6
topic.py
trans2es/models/topic.py
+2
-2
No files found.
trans2es/management/commands/trans2es_data2es_parallel.py
View file @
85a9ea27
...
...
@@ -147,18 +147,18 @@ class Command(BaseCommand):
group_is_recommend
=
0.0
# 是否官方推荐小组
if
topic_sql_item
[
0
]
.
group
and
topic_sql_item
[
0
]
.
group
.
is_recommend
:
offline_score
+=
4.0
group_is_recommend
=
4.0
#
if topic_sql_item[0].group and topic_sql_item[0].group.is_recommend:
#
offline_score += 4.0
#
group_is_recommend = 4.0
topic_level_score
=
0.0
# 帖子等级
if
topic_sql_item
[
0
]
.
content_level
==
'5'
:
offline_score
+=
6.0
topic_level_score
=
6.0
elif
topic_sql_item
[
0
]
.
content_level
==
'4'
:
offline_score
+=
5.0
topic_level_score
=
5.0
elif
topic_sql_item
[
0
]
.
content_level
==
'4'
:
offline_score
+=
3.0
topic_level_score
=
3.0
elif
topic_sql_item
[
0
]
.
content_level
==
'3'
:
offline_score
+=
2.0
topic_level_score
=
2.0
...
...
trans2es/models/topic.py
View file @
85a9ea27
...
...
@@ -130,8 +130,8 @@ class Topic(models.Model):
user_is_shadow
=
True
# 是否官方推荐小组
if
self
.
group
and
self
.
group
.
is_recommend
:
offline_score
+=
4.0
#
if self.group and self.group.is_recommend:
#
offline_score += 4.0
#帖子等级
if
self
.
content_level
==
'5'
:
...
...
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