from django.conf.urls.defaults import * from tastytools.api import Api from .system_api import (SystemResource, ServerModelResource, OperatingSystemResource, KeyValueResource, AllocationResource, LocationResource, SystemRackResource, SystemStatusResource, OperatingSystemData) system_api = Api(api_name='systems') system_api.register(SystemResource()) system_api.register(ServerModelResource()) system_api.register(OperatingSystemResource()) system_api.register(KeyValueResource()) system_api.register(AllocationResource()) system_api.register(LocationResource()) system_api.register(SystemRackResource()) system_api.register(SystemStatusResource()) system_api.register_testdata(OperatingSystemData) urlpatterns = patterns('', (r'', include(system_api.urls)), (r'^tastytools/', include('tastytools.urls'), {'api_name': system_api.api_name}), )
# (c) Crown Copyright 2014 Defence Science and Technology Laboratory UK # Author: Rich Brantingham """ Hook up the resources via the tastytools documentation """ # Tastytools is used to automatically build API documentation from tastytools.api import Api # Create a new API that binds together the existing APIs v1_api = Api(api_name='v1') # --- IDEA API --- from ideasapp.api import IdeaResource from ideasapp.api import CommentResource from ideasapp.api import TagResource from ideasapp.api import ProtectiveMarkingResource v1_api.register(CommentResource()) v1_api.register(TagResource()) v1_api.register(ProtectiveMarkingResource()) # --- PROJECTS API --- from projectsapp.api import ProjectResource from projectsapp.api import CommentResource from projectsapp.api import TagResource from projectsapp.api import ProtectiveMarkingResource v1_api.register(ProjectResource())
from django.conf.urls.defaults import * from system_api import SystemResource, ServerModelResource, OperatingSystemResource, KeyValueResource, AllocationResource, LocationResource, SystemRackResource, SystemStatusResource from system_api import PortDataResource, AdvisoryDataResource from system_api import OperatingSystemData #from tastypie.api import Api from tastytools.api import Api v3_api = Api(api_name='v3') v3_api.register(SystemResource()) v3_api.register(ServerModelResource()) v3_api.register(OperatingSystemResource()) v3_api.register(KeyValueResource()) v3_api.register(AllocationResource()) v3_api.register(LocationResource()) v3_api.register(SystemRackResource()) v3_api.register(SystemStatusResource()) v3_api.register(AdvisoryDataResource()) v3_api.register(PortDataResource()) v3_api.register_testdata(OperatingSystemData) urlpatterns = patterns( '', (r'', include(v3_api.urls)), (r'^tastytools/', include('tastytools.urls'), { 'api_name': v3_api.api_name }), )