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
alpha
physical
Commits
8a71b5c4
Commit
8a71b5c4
authored
Nov 24, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
2be7f285
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
user_follow.py
trans2es/models/user_follow.py
+1
-1
type_info.py
trans2es/type_info.py
+2
-2
No files found.
trans2es/models/user_follow.py
View file @
8a71b5c4
...
@@ -18,7 +18,7 @@ class UserFollow(models.Model):
...
@@ -18,7 +18,7 @@ class UserFollow(models.Model):
app_label
=
'api'
app_label
=
'api'
#user_id = models.IntegerField(verbose_name="用户ID")
#user_id = models.IntegerField(verbose_name="用户ID")
user
=
models
.
ForeignKey
(
User
,
related_name
=
"userFollow"
,
verbose_name
=
"关注用户信息"
)
user
=
models
.
ForeignKey
(
User
,
related_name
=
"userFollow"
,
verbose_name
=
"关注用户信息"
,
null
=
False
)
#user = models.ForeignKey(User, related_name='userFollow',on_delete=models.CASCADE)
#user = models.ForeignKey(User, related_name='userFollow',on_delete=models.CASCADE)
follow_id
=
models
.
IntegerField
(
verbose_name
=
"关注的用户ID"
)
follow_id
=
models
.
IntegerField
(
verbose_name
=
"关注的用户ID"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
"是否上线"
)
is_online
=
models
.
BooleanField
(
verbose_name
=
"是否上线"
)
...
...
trans2es/type_info.py
View file @
8a71b5c4
...
@@ -248,8 +248,8 @@ def get_type_info_map():
...
@@ -248,8 +248,8 @@ def get_type_info_map():
name
=
"user"
,
#用户
name
=
"user"
,
#用户
type
=
"user"
,
type
=
"user"
,
model
=
user
.
User
,
model
=
user
.
User
,
#query_deferred=lambda:user.User.objects.prefetch_related("userFollow"
).query,
query_deferred
=
lambda
:
user
.
User
.
objects
.
all
(
)
.
query
,
query_deferred
=
lambda
:
user
.
User
.
objects
.
prefetch_related
(
"userFollow"
)
.
query
,
#
query_deferred=lambda: user.User.objects.prefetch_related("userFollow").query,
get_data_func
=
UserTransfer
.
get_user_data
,
get_data_func
=
UserTransfer
.
get_user_data
,
bulk_insert_chunk_size
=
100
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_chunk_size
=
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