Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
saturn
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
赵磊
saturn
Commits
cdd2e754
Commit
cdd2e754
authored
Apr 18, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
Haow/dev See merge request
alpha/saturn!44
parents
89891280
2cac4681
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
urls.py
api/urls.py
+5
-0
reply.py
api/views/reply.py
+22
-0
topic.py
api/views/topic.py
+1
-1
No files found.
api/urls.py
View file @
cdd2e754
...
@@ -4,6 +4,8 @@ from django.conf.urls import url
...
@@ -4,6 +4,8 @@ from django.conf.urls import url
from
.views
import
user
from
.views
import
user
from
.views
import
topic
from
.views
import
topic
from
.views
import
tag
from
.views
import
tag
from
.views
import
reply
urlpatterns
=
[
urlpatterns
=
[
# grasp
# grasp
...
@@ -22,4 +24,7 @@ urlpatterns = [
...
@@ -22,4 +24,7 @@ urlpatterns = [
url
(
r'^v1/validate_3party_account$'
,
user
.
Validate3PartyAccount
.
as_view
(),
name
=
'validate_3party_account$'
),
url
(
r'^v1/validate_3party_account$'
,
user
.
Validate3PartyAccount
.
as_view
(),
name
=
'validate_3party_account$'
),
url
(
r'^v1/user/batch_create_shadow_user$'
,
user
.
BatchCreateShadowUser
.
as_view
(),
name
=
'batch_create_shadow_user$'
),
url
(
r'^v1/user/batch_create_shadow_user$'
,
user
.
BatchCreateShadowUser
.
as_view
(),
name
=
'batch_create_shadow_user$'
),
url
(
r'^v1/user/batch_update_user_level_fans$'
,
user
.
BatchUpdateUserLevelFansNum
.
as_view
(),
name
=
'batch_update_user_level_fans$'
),
url
(
r'^v1/user/batch_update_user_level_fans$'
,
user
.
BatchUpdateUserLevelFansNum
.
as_view
(),
name
=
'batch_update_user_level_fans$'
),
# reply
url
(
r'^v1/reply/create_for_inner$'
,
reply
.
CreateReplyForInner
.
as_view
(),
name
=
'create_reply_for_inner'
),
]
]
api/views/reply.py
0 → 100644
View file @
cdd2e754
import
json
from
api.views.base_view
import
BaseView
class
CreateReplyForInner
(
BaseView
):
"""
内部使用,创建评论回复
"""
def
post
(
self
,
request
):
user_id
=
request
.
POST
.
get
(
'user_id'
)
topic_id
=
request
.
POST
.
get
(
'topic_id'
)
content
=
request
.
POST
.
get
(
'content'
,
''
)
replied_id
=
request
.
POST
.
get
(
'replied_id'
)
error
,
data
=
self
.
call_rpc
(
'venus/community/reply/for_inner_create'
,
user_id
=
user_id
,
topic_id
=
topic_id
,
content
=
content
,
replied_id
=
replied_id
)
if
error
:
return
self
.
error
(
error
)
return
self
.
ok
(
data
=
data
)
api/views/topic.py
View file @
cdd2e754
...
@@ -110,7 +110,7 @@ class CreateTopicForBatch(BaseView):
...
@@ -110,7 +110,7 @@ class CreateTopicForBatch(BaseView):
)
)
if
_tag_error
:
if
_tag_error
:
return
self
.
error
(
_tag_error
)
return
self
.
error
(
_tag_error
)
_tag_data
.
extend
(
location_tags
)
_tag_data
.
update
(
location_tags
)
# 更新发帖
# 更新发帖
# 处理标签,将文本中的标签处理成现有标签
# 处理标签,将文本中的标签处理成现有标签
...
...
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