Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 1 | from django.conf import settings |
Scott Baker | 5face3a | 2014-08-05 10:15:26 -0700 | [diff] [blame] | 2 | from core.models import Site |
| 3 | |
Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 4 | |
Scott Baker | a226eb4 | 2014-06-09 11:55:26 -0700 | [diff] [blame] | 5 | def planetstack(request): |
Scott Baker | 5face3a | 2014-08-05 10:15:26 -0700 | [diff] [blame] | 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} |