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