Migrate pagevote and bookmark to use content_type
This commit is contained in:
parent
64495be799
commit
36e27321f7
19 changed files with 285 additions and 87 deletions
|
@ -224,9 +224,6 @@ class ProblemSolution(
|
|||
context["has_solved_problem"] = self.problem.id in self.get_completed_problems()
|
||||
return context
|
||||
|
||||
def get_comment_page(self):
|
||||
return "s:" + self.problem.code
|
||||
|
||||
|
||||
class ProblemRaw(
|
||||
ProblemMixin, TitleMixin, TemplateResponseMixin, SingleObjectMixin, View
|
||||
|
@ -270,9 +267,6 @@ class ProblemDetail(
|
|||
context_object_name = "problem"
|
||||
template_name = "problem/problem.html"
|
||||
|
||||
def get_comment_page(self):
|
||||
return "p:%s" % self.object.code
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ProblemDetail, self).get_context_data(**kwargs)
|
||||
user = self.request.user
|
||||
|
@ -843,9 +837,6 @@ class ProblemFeed(ProblemList, FeedView):
|
|||
title = _("Problem feed")
|
||||
feed_type = None
|
||||
|
||||
def get_comment_page(self, problem):
|
||||
return "p:%s" % problem.code
|
||||
|
||||
# arr = [[], [], ..]
|
||||
def merge_recommendation(self, arr):
|
||||
seed = datetime.now().strftime("%d%m%Y")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue