diff --git a/aleksis/core/templates/dynamic_preferences/sections.html b/aleksis/core/templates/dynamic_preferences/sections.html index 39b97496fd4542cfbad440f3571eb2b6f8df86d2..344962dfdfd6ed21ff25aef9056a823904260234 100644 --- a/aleksis/core/templates/dynamic_preferences/sections.html +++ b/aleksis/core/templates/dynamic_preferences/sections.html @@ -1,11 +1,6 @@ {% load i18n %} <ul class="tabs"> <li class="tab "> - <a href="{% url registry_url %}" - class="{% if not active_section %}active{% endif %}" - target="_self"> - {% trans "All" %} - </a> {% for section in registry.section_objects.values %} <li class="tab"> <a class="{% if active_section == section.name %}active{% endif %}" diff --git a/aleksis/core/views.py b/aleksis/core/views.py index 016b49052f9272bd3743c78eb86689a0395194bd..ff23d83fde098d32f2edf77ba6e032d6279fb38d 100644 --- a/aleksis/core/views.py +++ b/aleksis/core/views.py @@ -538,6 +538,10 @@ def preferences( # Invalid registry name passed from URL return HttpResponseNotFound() + if not section and len(registry.sections()) > 0: + default_section = list(registry.sections())[0] + return redirect(f"preferences_{registry_name}", default_section) + # Build final form from dynamic-preferences form_class = preference_form_builder(form_class, instance=instance, section=section)