diff --git a/app/app/views.py b/app/app/views.py index 13c44a52..7a360b19 100644 --- a/app/app/views.py +++ b/app/app/views.py @@ -13,7 +13,7 @@ def health(request): def home(request): template = "app/home.html" - context = {"home_page": "active"} + context = {"current_page": "home"} return render(request, template_name=template, context=context) @@ -22,14 +22,14 @@ def institutions(request): template = "app/institutions.html" institutions = Institution.objects.all().order_by("name").values() - context = {"institutions_page": "active", "institutions": institutions} + context = {"current_page": "institutions", "institutions": institutions} return render(request, template_name=template, context=context) def search(request): template = "app/search.html" - context = {"search_page": "active"} + context = {"current_page": "search"} return render(request, template_name=template, context=context) diff --git a/app/general/admin.py b/app/general/admin.py index fe219969..c5b4619c 100644 --- a/app/general/admin.py +++ b/app/general/admin.py @@ -18,7 +18,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - + # If the instance has a mime_type, the field should be disabled if not self.instance.mime_type: self.fields["mime_type"].widget = HiddenInput() diff --git a/app/templates/base.html b/app/templates/base.html index 6057eebd..f0e1f9c1 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -27,13 +27,22 @@