Reinami / sanic_crud

MIT License
54 stars 12 forks source link

crud_generation module--generate_crud function bugs or enhance #70

Open aohan237 opened 7 years ago

aohan237 commented 7 years ago

change generate_crud args to: generate_crud(app, model_array, base_url='/', methods=['GET']):


app.add_route(_generate_base_route(model_array), base_url, methods=methods)

this may will enalbe crud to start with more api edition, such as 'v1, v2'

if not ,original code will have exception if there is already a '/'

this is my first pull request in github, hope you can understand, and this will help