Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIManager.create_api should accept SQLAlchemy column objects #350

Closed
Xion opened this issue Aug 21, 2014 · 1 comment
Closed

APIManager.create_api should accept SQLAlchemy column objects #350

Xion opened this issue Aug 21, 2014 · 1 comment

Comments

@Xion
Copy link
Contributor

@Xion Xion commented Aug 21, 2014

Consider the following, intuitive usage:

manager.create_api(Person, exclude_columns=[Person.email])

Right now, this is incorrect, because exclude_columns (and include_columns) expects a list of strings. Detecting Columns and column attributes of ORM models shouldn't be too hard. I can shoot a PR if this is something you deem worth adding.

@jfinkels
Copy link
Owner

@jfinkels jfinkels commented Aug 21, 2014

Would be nice, but it might be harder than it seems. Would you allow both Column objects and strings? How about columns on related models?

I would definitely review a pull request for this if one were created.

Loading

Xion added a commit to Xion/flask-restless that referenced this issue Aug 22, 2014
Xion added a commit to Xion/flask-restless that referenced this issue Aug 29, 2014
@jfinkels jfinkels closed this in 7310ffe Sep 7, 2014
jfinkels added a commit that referenced this issue Sep 7, 2014
Fix #350: APIManager.create_api now accepts SQLAlchemy column objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants