mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-17 10:33:15 +01:00
Add pending changes warning context processor
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from .models import WireGuardInstance
|
||||
|
||||
|
||||
def pending_changes_warning(request):
|
||||
if request.user.is_authenticated:
|
||||
pending = WireGuardInstance.objects.filter(pending_changes=True).exists()
|
||||
else:
|
||||
pending = False
|
||||
return {'pending_changes_warning': pending}
|
||||
Reference in New Issue
Block a user