.
This commit is contained in:
+2
-2
@@ -175,7 +175,7 @@ class Rapid(models.Model):
|
||||
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('rapids:rapid_detail', kwargs={'pk': self.pk})
|
||||
return reverse('rapids:question_detail', kwargs={'pk': self.pk})
|
||||
|
||||
def get_authors(self):
|
||||
"""Returns a comma seperated text list of authors"""
|
||||
@@ -317,7 +317,7 @@ class Note(models.Model):
|
||||
|
||||
def get_absolute_url(self):
|
||||
self.pk = self.rapid_id
|
||||
return reverse('rapids:rapid_detail', kwargs={'pk': self.pk})
|
||||
return reverse('rapids:question_detail', kwargs={'pk': self.pk})
|
||||
|
||||
def __str__(self):
|
||||
return "{} [{}] {}".format(self.rapid, self.author, self.created_on)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class RapidTable(tables.Table):
|
||||
text='Edit',
|
||||
args=[A('pk')],
|
||||
orderable=False)
|
||||
view = tables.LinkColumn('rapids:rapid_detail',
|
||||
view = tables.LinkColumn('rapids:question_detail',
|
||||
text='View',
|
||||
args=[A('pk')],
|
||||
orderable=False)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{category}}:
|
||||
<ul>
|
||||
{% for rapid in rapids %}
|
||||
<li><a href="{% url 'rapids:rapid_detail' pk=rapid.pk %}">{{rapid}}
|
||||
<li><a href="{% url 'rapids:question_detail' pk=rapid.pk %}">{{rapid}}
|
||||
[{{rapid.get_authors}}]</a></li>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@@ -5,7 +5,7 @@ My Questions:
|
||||
<ul>
|
||||
{% for rapid in user_rapids %}
|
||||
<li{% if rapid.scrapped %} class='rapid-scrapped' {% endif %}><a
|
||||
href="{% url 'rapids:rapid_detail' pk=rapid.pk %}">{{rapid}}
|
||||
href="{% url 'rapids:question_detail' pk=rapid.pk %}">{{rapid}}
|
||||
[{{rapid.get_authors}}]</a></li>
|
||||
|
||||
{% endfor %}
|
||||
@@ -15,7 +15,7 @@ Other Questions:
|
||||
<ul>
|
||||
{% for rapid in other_rapids %}
|
||||
<li{% if rapid.scrapped %} class='rapid-scrapped' {% endif %}><a
|
||||
href="{% url 'rapids:rapid_detail' pk=rapid.pk %}">{{rapid}} [{{rapid.get_authors}}]</a></li>
|
||||
href="{% url 'rapids:question_detail' pk=rapid.pk %}">{{rapid}} [{{rapid.get_authors}}]</a></li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ urlpatterns = [
|
||||
path("question/", views.RapidView.as_view(), name="rapid_view"),
|
||||
#path("unchecked/", views.unchecked_list, name="unchecked_list"),
|
||||
#path("verified/<int:pk>/", views.verified_detail, name="verified_detail"),
|
||||
path("question/<int:pk>/", views.rapid_detail, name="rapid_detail"),
|
||||
path("question/<int:pk>/", views.question_detail, name="question_detail"),
|
||||
path("question/<int:pk>/split", views.rapid_split, name="rapid_split"),
|
||||
path("question/<int:pk>/clone", views.RapidClone.as_view(), name="rapid_clone"),
|
||||
#path("verified/", views.verified, name="verified"),
|
||||
|
||||
+4
-4
@@ -81,7 +81,7 @@ class AuthorOrCheckerRequiredMixin(object):
|
||||
|
||||
|
||||
@login_required
|
||||
def rapid_detail(request, pk):
|
||||
def question_detail(request, pk):
|
||||
rapid = get_object_or_404(Rapid, pk=pk)
|
||||
|
||||
# if request.user not in rapid.author.all():
|
||||
@@ -89,7 +89,7 @@ def rapid_detail(request, pk):
|
||||
|
||||
# logging.debug(rapid.rapid_notes.first())
|
||||
# logging.debug(rapid.subspecialty.first().name.all())
|
||||
return render(request, "rapids/rapid_detail.html", {"question": rapid})
|
||||
return render(request, "rapids/question_detail.html", {"question": rapid})
|
||||
|
||||
|
||||
@login_required
|
||||
@@ -127,7 +127,7 @@ def rapid_split(request, pk):
|
||||
|
||||
# logging.debug(rapid.rapid_notes.first())
|
||||
# logging.debug(rapid.subspecialty.first().name.all())
|
||||
return render(request, "rapids/rapid_detail.html", {"question": rapid})
|
||||
return render(request, "rapids/question_detail.html", {"question": rapid})
|
||||
|
||||
|
||||
@login_required
|
||||
@@ -395,7 +395,7 @@ def rapid_scrap(request, pk):
|
||||
|
||||
rapid.scrapped = not rapid.scrapped
|
||||
rapid.save()
|
||||
return HttpResponseRedirect(reverse("rapids:rapid_detail", args=(pk,)))
|
||||
return HttpResponseRedirect(reverse("rapids:question_detail", args=(pk,)))
|
||||
|
||||
|
||||
# @login_required
|
||||
|
||||
Reference in New Issue
Block a user