.
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
{% extends 'atlas/base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<ul>
|
||||||
|
{% for case in collection %}
|
||||||
|
<li>{{case.title}}: {{case.descriptions}}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{% extends 'atlas/base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<ul>
|
||||||
|
{% for collection in collections %}
|
||||||
|
<li>{{collection.name}}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
@@ -10,6 +10,8 @@ urlpatterns = [
|
|||||||
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
||||||
path("author/", views.author_list, name="author_list"),
|
path("author/", views.author_list, name="author_list"),
|
||||||
path("case/", views.CaseView.as_view(), name="case_view"),
|
path("case/", views.CaseView.as_view(), name="case_view"),
|
||||||
|
path("collection/", views.collection_index_view, name="collection_index_view"),
|
||||||
|
path("collections/<int:pk>", views.collection_detail_view, name="collection_detail_view"),
|
||||||
path("condition/", views.ConditionView.as_view(), name="condition_view"),
|
path("condition/", views.ConditionView.as_view(), name="condition_view"),
|
||||||
path("categories/", views.categories_list, name="categories_list"),
|
path("categories/", views.categories_list, name="categories_list"),
|
||||||
path("condition/<int:pk>", views.condition_detail, name="condition_detail"),
|
path("condition/<int:pk>", views.condition_detail, name="condition_detail"),
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ from .forms import (
|
|||||||
)
|
)
|
||||||
from .models import (
|
from .models import (
|
||||||
Case,
|
Case,
|
||||||
|
CaseCollection,
|
||||||
Condition,
|
Condition,
|
||||||
PathologicalProcess,
|
PathologicalProcess,
|
||||||
Presentation,
|
Presentation,
|
||||||
@@ -891,3 +892,14 @@ def categories_list(request):
|
|||||||
# "condition": condition,
|
# "condition": condition,
|
||||||
# },
|
# },
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def collection_index_view(request):
|
||||||
|
collections = CaseCollection.objects.all()
|
||||||
|
|
||||||
|
return render(request, "atlas/collection_index.html", {"collections": collections})
|
||||||
|
|
||||||
|
def collection_detail_view(request, pk):
|
||||||
|
collection = get_object_or_404(CaseCollection, pk)
|
||||||
|
|
||||||
|
return render(request, "atlas/collection_index.html", {"collection": collection})
|
||||||
Reference in New Issue
Block a user