Пример #1
0
from sunpower import api
from products.views import ProductDetail, ProductList

api.add_resource(ProductDetail, '/products/<string:_id>')
api.add_resource(ProductList, '/products')
Пример #2
0
from sunpower import api
from sunpower.views import Index

api.add_resource(Index, '/')
Пример #3
0
from sunpower import api
from distributors.views import DistributorDetail, DistributorList

api.add_resource(DistributorDetail, '/distributors/<string:_id>')
api.add_resource(DistributorList, '/distributors')
Пример #4
0
from sunpower import api
from agents.views import AgentDetail, AgentList

api.add_resource(AgentDetail, '/agents/<string:_id>')
api.add_resource(AgentList, '/agents')