Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64628

Re: Case insensitive exists()?

References (1 earlier) <roy-7A7FAE.20082622012014@news.panix.com> <mailman.5855.1390439920.18130.python-list@python.org> <roy-1771A1.20270322012014@news.panix.com> <CACwCsY6Lq=x=XSc6Edqh+v0RH2Q-9t+2cgJ+xbsC+ADfsh90pA@mail.gmail.com> <CAPTjJmpOAbELy1+w-HvZAaBdsknvsyPsTnXBfkiULhQDaB3i3g@mail.gmail.com>
Date 2014-01-23 12:02 -0700
Subject Re: Case insensitive exists()?
From Larry Martell <larry.martell@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5904.1390503746.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Jan 22, 2014 at 9:29 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Thu, Jan 23, 2014 at 3:24 PM, Larry Martell <larry.martell@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.

So it turned out that in the django model definition for this object
there was code that was doing some character mapping that was causing
this. That code was added to 'fix' another problem, but the mapping
strings were not qualified enough and it was doing some unintended
mapping. Changing those strings to be more specific fixed my problem.

Thanks to all for the replies.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 17:58 -0700
  Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:08 -0500
    Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 18:18 -0700
      Re: Case insensitive exists()? Roy Smith <roy@panix.com> - 2014-01-22 20:27 -0500
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-22 21:24 -0700
        Re: Case insensitive exists()? Chris Angelico <rosuav@gmail.com> - 2014-01-23 15:29 +1100
        Re: Case insensitive exists()? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-01-23 15:43 +0000
        Re: Case insensitive exists()? Larry Martell <larry.martell@gmail.com> - 2014-01-23 12:02 -0700
      Re: Case insensitive exists()? Dan Sommers <dan@tombstonezero.net> - 2014-01-23 07:51 +0000
  Re: Case insensitive exists()? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-23 12:06 +0000
  Re: Case insensitive exists()? Grant Edwards <invalid@invalid.invalid> - 2014-01-23 14:58 +0000

csiph-web