Case insensitive exists()?

Chris Angelico rosuav at gmail.com
Wed Jan 22 23:29:23 EST 2014


On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell <larry.martell at gmail.com> wrote:
> I am writing something that is part of a django app, that based on
> some web entry from the user, I run a query, get back a list of files
> and have to go receive them and serve them up back to the browser. My
> script is all done and seem to be working, then today I was informed
> it was not serving up all the images. Debugging revealed that it was
> this case issue - I was matching with exists(). As I've said, coding a
> solution is easy, but I fear it will be too slow. Speed is important
> in web apps - users have high expectations. Guess I'll just have to
> try it and see.

Would it be a problem to rename all the files? Then you could simply
lower() the input name and it'll be correct.

ChrisA



More information about the Python-list mailing list