add site to user creating admin so users can no longer be created without sites
[plstackapi.git] / planetstack / core / context_processors.py
1 from django.conf import settings
2 from core.models import Site
3
4
5 def planetstack(request):
6     allSites = []
7     for site in Site.objects.all():
8         allowNewUsers = True    # replace with logic for blessing sites for registration, if necessary
9         allSites.append( {"name": site.name,
10                            "id": site.id,
11                            "allowNewUsers": allowNewUsers} )
12
13     return {"DISABLE_MINIDASHBOARD": settings.DISABLE_MINIDASHBOARD,
14             "sites": allSites}