delete unused stuffs
This commit is contained in:
@@ -62,7 +62,6 @@ class TopicCreateView(LoginRequiredMixin, CreateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["topic_group"] = TopicGroup.objects.get(slug=self.slug)
|
||||
|
||||
return context
|
||||
|
||||
def get_initial(self):
|
||||
@@ -83,8 +82,6 @@ class TopicDetailView(LoginRequiredMixin, DetailView):
|
||||
active_topic = Topic.objects.get(id=self.object.id)
|
||||
attachments = Attachment.objects.filter(topic__slug=self.slug).order_by("title")
|
||||
|
||||
print(self.request.user.id)
|
||||
|
||||
tasks = None
|
||||
if active_topic.task_list:
|
||||
tasks = deque(
|
||||
@@ -104,13 +101,6 @@ class TopicDetailView(LoginRequiredMixin, DetailView):
|
||||
|
||||
return context
|
||||
|
||||
def get_success_url(self):
|
||||
context = {
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
|
||||
class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
model = Topic
|
||||
@@ -132,7 +122,6 @@ class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["slug"] = self.slug
|
||||
context["topic"] = Topic.objects.get(slug=self.slug)
|
||||
|
||||
return context
|
||||
|
||||
def get_initial(self):
|
||||
@@ -142,7 +131,6 @@ class TopicUpdateView(LoginRequiredMixin, UpdateView):
|
||||
context = {
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
|
||||
@@ -172,7 +160,6 @@ class AttachmentCreateView(LoginRequiredMixin, CreateView):
|
||||
context = {
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
|
||||
@@ -210,14 +197,6 @@ class AttachmentDetailView(LoginRequiredMixin, DetailView):
|
||||
|
||||
return context
|
||||
|
||||
def get_success_url(self):
|
||||
context = {
|
||||
"topic_slug": self.topic_slug,
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
class AttachmentUpdateView(LoginRequiredMixin, UpdateView):
|
||||
model = Attachment
|
||||
@@ -255,7 +234,6 @@ class AttachmentUpdateView(LoginRequiredMixin, UpdateView):
|
||||
"topic_slug": self.topic_slug,
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
@@ -293,7 +271,6 @@ class EtherpadCreateView(LoginRequiredMixin, CreateView):
|
||||
"topic_slug": self.topic_slug,
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
@@ -331,7 +308,6 @@ class FileUploadCreateView(LoginRequiredMixin, CreateView):
|
||||
"topic_slug": self.topic_slug,
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:attachment", kwargs=context)
|
||||
|
||||
|
||||
@@ -364,5 +340,4 @@ class TaskCreateView(LoginRequiredMixin, CreateView):
|
||||
context = {
|
||||
"slug": self.slug,
|
||||
}
|
||||
|
||||
return reverse("intern:topic", kwargs=context)
|
||||
|
||||
Reference in New Issue
Block a user