.
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
{% block content %}
|
||||
{{category}}:
|
||||
<ul>
|
||||
{% for rapid in rapids %}
|
||||
<li><a href="{% url 'rapids:question_detail' pk=rapid.pk %}">{{rapid}}
|
||||
[{{rapid.get_authors}}]</a></li>
|
||||
{% for question in questions %}
|
||||
<li><a href="{% url 'rapids:question_detail' pk=question.pk %}">{{question}}
|
||||
[{{question.get_authors}}]</a></li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -156,23 +156,6 @@ def rapid_split(request, pk):
|
||||
return render(request, "rapids/question_detail.html", {"question": rapid})
|
||||
|
||||
|
||||
@login_required
|
||||
def author_detail(request, pk):
|
||||
# logging.debug(Author.objects.all())
|
||||
# author = get_object_or_404(Author, pk=pk)
|
||||
author = User.objects.get(pk=pk)
|
||||
|
||||
rapids = Rapid.objects.filter(author=pk)
|
||||
|
||||
return render(
|
||||
request, "rapids/category_detail.html", {"category": author, "rapids": rapids}
|
||||
)
|
||||
|
||||
|
||||
def author_list(request):
|
||||
authors = User.objects.all()
|
||||
|
||||
return render(request, "rapids/author_list.html", {"authors": authors})
|
||||
|
||||
|
||||
class RapidCreationDefaultView(LoginRequiredMixin, UpdateView):
|
||||
|
||||
Reference in New Issue
Block a user