Jelajahi Sumber

Fixes #8306: Redirect user to previous page after login

jeremystretch 4 tahun lalu
induk
melakukan
9152ba72f1

+ 1 - 0
docs/release-notes/version-3.1.md

@@ -14,6 +14,7 @@
 * [#8285](https://github.com/netbox-community/netbox/issues/8285) - Fix `cluster_count` under tenant REST API serializer
 * [#8287](https://github.com/netbox-community/netbox/issues/8287) - Correct label in export template form
 * [#8301](https://github.com/netbox-community/netbox/issues/8301) - Fix delete button for various object children views
+* [#8306](https://github.com/netbox-community/netbox/issues/8306) - Redirect user to previous page after login
 
 ---
 

+ 1 - 1
netbox/templates/inc/profile_button.html

@@ -38,7 +38,7 @@
   </div>
 {% else %}
   <div class="btn-group">
-    <a class="btn btn-primary ws-nowrap" type="button" href="{% url 'login' %}">
+    <a class="btn btn-primary ws-nowrap" type="button" href="{% url 'login' %}?next={{ request.path }}">
       <i class="mdi mdi-login-variant"></i> Log In
     </a>
     <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown">