mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-17 19:59:22 +00:00
Initial Import.
This commit is contained in:
16
app/stores/context_processors.py
Normal file
16
app/stores/context_processors.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from django.contrib.sites.models import Site
|
||||
from .models import ClaimRequest
|
||||
|
||||
def site(request):
|
||||
return {
|
||||
'site': Site.objects.get_current()
|
||||
}
|
||||
|
||||
|
||||
def pending_admin(request):
|
||||
if request.user.is_superuser:
|
||||
pending = ClaimRequest.objects.filter(status=ClaimRequest.CLAIM_STATUS_PENDING).count()
|
||||
return {
|
||||
'admin_pending_requests': pending
|
||||
}
|
||||
return {}
|
||||
Reference in New Issue
Block a user