This reverts commit 411f3da45e
.
This commit is contained in:
parent
411f3da45e
commit
0494a36681
784 changed files with 307 additions and 696 deletions
0
judge/models/__init__.py
Executable file → Normal file
0
judge/models/__init__.py
Executable file → Normal file
0
judge/models/bookmark.py
Executable file → Normal file
0
judge/models/bookmark.py
Executable file → Normal file
0
judge/models/choices.py
Executable file → Normal file
0
judge/models/choices.py
Executable file → Normal file
12
judge/models/comment.py
Executable file → Normal file
12
judge/models/comment.py
Executable file → Normal file
|
@ -56,7 +56,6 @@ class Comment(MPTTModel):
|
|||
related_name="replies",
|
||||
on_delete=CASCADE,
|
||||
)
|
||||
|
||||
versions = VersionRelation()
|
||||
|
||||
class Meta:
|
||||
|
@ -112,15 +111,6 @@ class Comment(MPTTModel):
|
|||
if len(output) >= n:
|
||||
return output
|
||||
return output
|
||||
|
||||
@cached_property
|
||||
def get_replies(self):
|
||||
query = Comment.filter(parent=self)
|
||||
return len(query)
|
||||
|
||||
@cached_property
|
||||
def get_revisions(self):
|
||||
return self.versions.count()
|
||||
|
||||
@cached_property
|
||||
def page_title(self):
|
||||
|
@ -151,7 +141,7 @@ class Comment(MPTTModel):
|
|||
)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return "%s?comment-id=%d#comment-%d" % (self.link, self.id, self.id)
|
||||
return "%s#comment-%d" % (self.link, self.id)
|
||||
|
||||
|
||||
class CommentVote(models.Model):
|
||||
|
|
0
judge/models/contest.py
Executable file → Normal file
0
judge/models/contest.py
Executable file → Normal file
0
judge/models/course.py
Executable file → Normal file
0
judge/models/course.py
Executable file → Normal file
0
judge/models/interface.py
Executable file → Normal file
0
judge/models/interface.py
Executable file → Normal file
0
judge/models/message.py
Executable file → Normal file
0
judge/models/message.py
Executable file → Normal file
0
judge/models/pagevote.py
Executable file → Normal file
0
judge/models/pagevote.py
Executable file → Normal file
0
judge/models/problem.py
Executable file → Normal file
0
judge/models/problem.py
Executable file → Normal file
0
judge/models/problem_data.py
Executable file → Normal file
0
judge/models/problem_data.py
Executable file → Normal file
0
judge/models/profile.py
Executable file → Normal file
0
judge/models/profile.py
Executable file → Normal file
0
judge/models/runtime.py
Executable file → Normal file
0
judge/models/runtime.py
Executable file → Normal file
0
judge/models/submission.py
Executable file → Normal file
0
judge/models/submission.py
Executable file → Normal file
0
judge/models/ticket.py
Executable file → Normal file
0
judge/models/ticket.py
Executable file → Normal file
0
judge/models/volunteer.py
Executable file → Normal file
0
judge/models/volunteer.py
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue