.
This commit is contained in:
@@ -5,6 +5,8 @@ from django.shortcuts import get_object_or_404, render
|
||||
from django.views.generic.edit import UpdateView, CreateView
|
||||
from django.views.generic.detail import DetailView
|
||||
|
||||
from atlas.models import Subspecialty
|
||||
|
||||
from .models import Entry, Formats
|
||||
# Create your views here.
|
||||
from .tables import EntryTable
|
||||
@@ -116,6 +118,17 @@ def format_search(request):
|
||||
return render(request, "oef/format_search_results.html", {"entries": entries})
|
||||
return render(request, "oef/format_search.html",)
|
||||
|
||||
def subspecialties(request):
|
||||
subspecialties = Subspecialty.objects.all()
|
||||
|
||||
format_map = []
|
||||
for s in subspecialties:
|
||||
format_map.append((s, s.formats_set.all()))
|
||||
|
||||
return render(request, "oef/subspecialties.html", context={
|
||||
"format_map": format_map
|
||||
})
|
||||
|
||||
|
||||
def questions(request):
|
||||
questions = set(Entry.objects.filter(inactive=False).values_list("questions", flat=True))
|
||||
|
||||
Reference in New Issue
Block a user