Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
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
edx
edx-platform
Commits
3e0bd55c
Commit
3e0bd55c
authored
Sep 13, 2016
by
Robert Raposa
Committed by
GitHub
Sep 13, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13445 from edx/robrap/TNL-5240
TNL-5240: Cache comment thread.
parents
4b9ab319
43590510
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
lms/lib/comment_client/comment.py
+7
-1
No files found.
lms/lib/comment_client/comment.py
View file @
3e0bd55c
...
...
@@ -27,9 +27,15 @@ class Comment(models.Model):
base_url
=
"{prefix}/comments"
.
format
(
prefix
=
settings
.
PREFIX
)
type
=
'comment'
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
Comment
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
_cached_thread
=
None
@property
def
thread
(
self
):
return
Thread
(
id
=
self
.
thread_id
,
type
=
'thread'
)
if
not
self
.
_cached_thread
:
self
.
_cached_thread
=
Thread
(
id
=
self
.
thread_id
,
type
=
'thread'
)
return
self
.
_cached_thread
@property
def
context
(
self
):
...
...
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