__find_api_end_point_for_viewset.py 253 Bytes
Newer Older
1
from general.api import get_api_config
2
3
4
5


def find_api_end_point_for_viewset(viewset_name):

6
    api_config = get_api_config()
7
8
9
10
11
    for obj in api_config:
        if obj['viewset'] == viewset_name:
            return obj['api_end_point']

    return None