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

error on quickimages example #3

Closed
macfire opened this issue Feb 3, 2014 · 2 comments
Closed

error on quickimages example #3

macfire opened this issue Feb 3, 2014 · 2 comments
Labels

Comments

@macfire
Copy link

macfire commented Feb 3, 2014

When I run $ python run.py in quickimages example, the terminal returns warning
"Filter type not supported for column: photo"

The app still runs, but error in browser on url http://0.0.0.0:8080/persongeneralview/list/

I narrowed the error down to line 28 in models.py
photo = Column(ImageColumn, nullable=False)

I changed "ImageColumn" to "String(150)" … it eliminates the error, but the ImageColumn functionality is not available, of course.

The last call in http://0.0.0.0:8080/persongeneralview/list/ shows error in widgets.py line 59
search_filters[col] = [unicode(flt.name) for flt in dict_filters[col]]


UPDATE

As a temporary fix, I commented out line 59 in widgets.py (noted above), instead of changing "ImageColumn" to "String(150)" (noted above) … this allows me to use the image upload feature.


UPDATE 2

Fix: flask_appbuilder/models/filters.py
line 163: if datamodel.is_text(col) or datamodel.is_string(col) or datamodel.is_image(col):

Added datamodel.is_image(col) to accommodate the extended datatype "ImageColumn"

@dpgaspar
Copy link
Owner

dpgaspar commented Feb 4, 2014

Yes, it's a bug. Your update does the trick, yet ImageColumn and FileColumn were being included has a possible filter, and that should not happen, and it's not very helpful since their name is UUID_<file_name>.

I've corrected the bug, and others, has well has some new features.
Thank you for reporting this!

Please update to 0.6.2. Take a close look at the 0.6.N version changes

(and use the new updated example of quickimages).

Please update this issue if successful (or not :) ) so i can safely close it.

@macfire
Copy link
Author

macfire commented Feb 13, 2014

Thanks for the update. (Sorry for the delay, I missed your post earlier)

@dpgaspar dpgaspar added the bug label May 4, 2014
StewartW pushed a commit to StewartW/Flask-AppBuilder that referenced this issue May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants