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

Improve docs re: configuration and examples #22

Open
cbronazc opened this issue Oct 13, 2014 · 5 comments
Open

Improve docs re: configuration and examples #22

cbronazc opened this issue Oct 13, 2014 · 5 comments

Comments

@cbronazc
Copy link
Contributor

IMAGES_PATH seems to only work as a list, can someone at least put this in the docs.
IMAGES_NAME, I can't for the life of me figure out what this does
Also it would be nice to have the from flask.ext.images import resized_img_src or url_for somewhere in the docs.

@mikeboers
Copy link
Owner

Thanks for your feedback!

The docs currently reside entirely in the README.

IMAGES_PATH could be a bit clearer, I agree, but IMAGES_NAME is described with the rest of the configuration.

The introduction covers the resized_img_src and url_for use cases; are you saying this is not enough, or was not visible enough?

Cheers,

Mike

@cbronazc
Copy link
Contributor Author

That was a quick response, I can submit a PR for the README IMAGES_PATH and url_for part if you want.

For IMAGES_NAME, I saw that part in the configs, but I don't understand what "The name of the registered endpoint" means. Is that the endpoint of the flask view method ? Whats the purpose of setting this variable ? It doesn't affect the generated url at all, or the location of the image storage or declare it as a set or anything. I read through the code but I'm just not grasping it.

I get how url_for and the other is used, but newbies might have a hard time understanding that you need to import them from this package, not from flask import x but from flask.ext.images import x. Putting that right above "Configuration" would be helpful.

Thanks!

@mikeboers
Copy link
Owner

Fair enough on all points. Some examples and slightly more conventional docs all around would be good. I also think that is one of the very last missing criteria for "approved" Flask extensions.

IMAGES_NAME is the endpoint of the Flask view method. Setting it allows for avoiding conflicts with another endpoint called "images". Without doing any research and just answering off the cuff, I'm 50-50 on if that sort of thing could/should be solved with blueprints.

@mikeboers mikeboers changed the title Can we clear up the docs on the configuration variables Improve docs re: configuration and examples Oct 21, 2014
@mikeboers
Copy link
Owner

I'm going to leave this open as the last thing to do for #11.

@crifan
Copy link

crifan commented Aug 25, 2016

Thanks for cbronazc's notice, otherwise I would still be crazy for Flask-Images not working.
Now I NOTICE that, the IMAGES_PATH is a list, not a single path string.
change my:
IMAGES_PATH = "static"
to:
IMAGES_PATH = ["static"]
then made it work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants