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