Skip to content
Snippets Groups Projects
Commit c7621afe authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '335-deactivate-all-view-in-preferences' into 'master'

Resolve "Deactivate "All" view in preferences"

Closes #335

See merge request !420
parents 66fa1b79 c0bd4c8c
No related branches found
No related tags found
1 merge request!420Resolve "Deactivate "All" view in preferences"
Pipeline #5090 passed
{% 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 %}"
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment