Views Package

Submodules

Accounts

APIs

Main

SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md

seed.views.main.angular_js_tests(request)

Jasmine JS unit test code covering AngularJS unit tests

seed.views.main.celery_queue(self, request, *args, **kwargs)

Returns the number of running and queued celery tasks. This action can only be performed by superusers

Returns:

{
    'active': {'total': n, 'tasks': []}, // Tasks that are currently being executed
    'reserved': {'total': n, 'tasks': []}, // Tasks waiting to be executed
    'scheduled': {'total': n, 'tasks': []}, // Tasks reserved by the worker when they have an eta or countdown
    'maxConcurrency': The maximum number of active tasks
}
seed.views.main.error404(request, exception)
seed.views.main.error410(request)
seed.views.main.error500(request)
seed.views.main.health_check(request)

Perform a health check without requiring authentication

seed.views.main.home(request)

the main view for the app Sets in the context for the django template:

  • app_urls: a json object of all the URLs that is loaded in the JS global namespace

  • username: the request user’s username (first and last name)

seed.views.main.version(self, request, *args, **kwargs)

Returns the SEED version and current git sha

Meters

Module contents

SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md