diff --git a/atlas/templates/atlas/collection_detail_view.html b/atlas/templates/atlas/collection_detail_view.html new file mode 100644 index 00000000..a501a27c --- /dev/null +++ b/atlas/templates/atlas/collection_detail_view.html @@ -0,0 +1,9 @@ +{% extends 'atlas/base.html' %} + +{% block content %} + +{% endblock %} \ No newline at end of file diff --git a/atlas/templates/atlas/collection_index_view.html b/atlas/templates/atlas/collection_index_view.html new file mode 100644 index 00000000..900924ae --- /dev/null +++ b/atlas/templates/atlas/collection_index_view.html @@ -0,0 +1,9 @@ +{% extends 'atlas/base.html' %} + +{% block content %} + +{% endblock %} \ No newline at end of file diff --git a/atlas/urls.py b/atlas/urls.py index ccf91a3e..c354b8c1 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -10,6 +10,8 @@ urlpatterns = [ path("author//", views.author_detail, name="author_detail"), path("author/", views.author_list, name="author_list"), path("case/", views.CaseView.as_view(), name="case_view"), + path("collection/", views.collection_index_view, name="collection_index_view"), + path("collections/", views.collection_detail_view, name="collection_detail_view"), path("condition/", views.ConditionView.as_view(), name="condition_view"), path("categories/", views.categories_list, name="categories_list"), path("condition/", views.condition_detail, name="condition_detail"), diff --git a/atlas/views.py b/atlas/views.py index cf72024e..d525ecdd 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -39,6 +39,7 @@ from .forms import ( ) from .models import ( Case, + CaseCollection, Condition, PathologicalProcess, Presentation, @@ -891,3 +892,14 @@ def categories_list(request): # "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}) \ No newline at end of file