How to use the gridcal.models.Membership.objects function in GridCal

To help you get started, weā€™ve selected a few GridCal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wikical / grical / gridcal / functions.py View on Github external
def is_user_in_group(user_id, group_id):
    if len(Membership.objects.filter(user__id__exact=user_id, group__id__exact=group_id)) == 1:
        return True
    else:
        return False

GridCal

GridCal is a Power Systems simulation program intended for professional use and research

LGPL-3.0
Latest version published 18 days ago

Package Health Score

78 / 100
Full package analysis

Similar packages