Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 15, 2005 23:52:25

Laurent R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Broken site since svn update


Hi,

I was using a "rather" old version of django svn with no problems. I'm using
Postgresql as backend. I updated sources a now I got a strange problem.

Since the beginning, one of my models (folder) contains a property defined
like this :

DMI_id = meta.SlugField(db_index = True, unique = True,
prepopulate_from=("title",))

Note the uppercase DMI.

My app is now crashing complaining that "folders"."DMI_id" does not exists in
table folders. That's true because in my database table I only have a dmi_id
field (note the lowercase dmi).

Everything was working well before my django sources update and I did not
change anything I my own poor code.

Does anybody have an explaination and/or a solution ??

Regards,

Laurent.

Offline

#2 Nov. 16, 2005 00:12:16

Eugene L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Broken site since svn update


Did you check if something from "Backwards-incompatible changes" list
(http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges) applies to
you?


"Laurent Rahuel" <> wrote in message

>
> Hi,
>
> I was using a "rather" old version of django svn with no problems. I'm
> using
> Postgresql as backend. I updated sources a now I got a strange problem.
>
> Since the beginning, one of my models (folder) contains a property defined
> like this :
>
> DMI_id = meta.SlugField(db_index = True, unique = True,
> prepopulate_from=("title",))
>
> Note the uppercase DMI.
>
> My app is now crashing complaining that "folders"."DMI_id" does not exists
> in
> table folders. That's true because in my database table I only have a
> dmi_id
> field (note the lowercase dmi).
>
> Everything was working well before my django sources update and I did not
> change anything I my own poor code.
>
> Does anybody have an explaination and/or a solution ??
>
> Regards,
>
> Laurent.
>

Offline

#3 Nov. 16, 2005 00:17:50

Laurent R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Broken site since svn update


Yes and I did not find anything relating any upper/lower case issue.

Le Mercredi 16 Novembre 2005 01:00, Eugene Lazutkin a écrit :
> Did you check if something from "Backwards-incompatible changes" list
> (http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges) applies
> to you?
>
>
> "Laurent Rahuel" <> wrote in message
>
>
> > Hi,
> >
> > I was using a "rather" old version of django svn with no problems. I'm
> > using
> > Postgresql as backend. I updated sources a now I got a strange problem.
> >
> > Since the beginning, one of my models (folder) contains a property
> > defined like this :
> >
> > DMI_id = meta.SlugField(db_index = True, unique = True,
> > prepopulate_from=("title",))
> >
> > Note the uppercase DMI.
> >
> > My app is now crashing complaining that "folders"."DMI_id" does not
> > exists in
> > table folders. That's true because in my database table I only have a
> > dmi_id
> > field (note the lowercase dmi).
> >
> > Everything was working well before my django sources update and I did not
> > change anything I my own poor code.
> >
> > Does anybody have an explaination and/or a solution ??
> >
> > Regards,
> >
> > Laurent.

Offline

#4 Nov. 16, 2005 00:45:37

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Broken site since svn update


On 11/15/05, Laurent Rahuel <> wrote:
> Since the beginning, one of my models (folder) contains a property defined
> like this :
>
> DMI_id = meta.SlugField(db_index = True, unique = True,
> prepopulate_from=("title",))
>
> Note the uppercase DMI.
>
> My app is now crashing complaining that "folders"."DMI_id" does not exists in
> table folders. That's true because in my database table I only have a dmi_id
> field (note the lowercase dmi).

As of revision 1224, Django quotes all database table and column names
in its queries. Basically that means they're case-sensitive now.

You can fix your problem by either doing an ALTER TABLE in your
database to rename the column to "DMI_id" (note capitalization), or
changing your Python code to be "dmi_id".

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#5 Nov. 16, 2005 00:56:25

Jakub L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Broken site since svn update


This may sound silly, but have you tried renaming that property in your model?

Or better yet using db_column parameter.
Would that help you?

DMI_id = meta.SlugField(db_index = True, unique = True,
prepopulate_from=("title",),db_column="dmi_id")

Wild guess: maybe escaping functions made something in the db backend
case sensitive.

Good Luck

On 11/15/05, Laurent Rahuel <> wrote:
>
> Yes and I did not find anything relating any upper/lower case issue.
>
> Le Mercredi 16 Novembre 2005 01:00, Eugene Lazutkin a écrit:
> > Did you check if something from "Backwards-incompatible changes" list
> > (http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges) applies
> > to you?
> >
> >
> > "Laurent Rahuel" <> wrote in message
> >
> >
> > > Hi,
> > >
> > > I was using a "rather" old version of django svn with no problems. I'm
> > > using
> > > Postgresql as backend. I updated sources a now I got a strange problem.
> > >
> > > Since the beginning, one of my models (folder) contains a property
> > > defined like this :
> > >
> > > DMI_id = meta.SlugField(db_index = True, unique = True,
> > > prepopulate_from=("title",))
> > >
> > > Note the uppercase DMI.
> > >
> > > My app is now crashing complaining that "folders"."DMI_id" does not
> > > exists in
> > > table folders. That's true because in my database table I only have a
> > > dmi_id
> > > field (note the lowercase dmi).
> > >
> > > Everything was working well before my django sources update and I did not
> > > change anything I my own poor code.
> > >
> > > Does anybody have an explaination and/or a solution ??
> > >
> > > Regards,
> > >
> > > Laurent.
>

Offline

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support