Added glossary and acknowledgement pages, and reworked the structure of the theory pages.
This commit is contained in:
@@ -7,7 +7,7 @@ from django.views import generic
|
||||
from itertools import chain
|
||||
from operator import attrgetter
|
||||
|
||||
from three_d_viewer.models import Sample, Category, Mineral
|
||||
from three_d_viewer.models import Sample, Category, Mineral, GlossaryEntry
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@@ -137,4 +137,13 @@ class FossilDetailView(generic.DetailView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
return context
|
||||
return context
|
||||
|
||||
class GlossaryView(generic.ListView):
|
||||
model = GlossaryEntry
|
||||
template_name = 'three_d_viewer/glossary.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(GlossaryView, self).get_context_data(**kwargs)
|
||||
context['entries'] = GlossaryEntry.objects.all()
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user